So just to clarify asp or asp.net? You can use request.form
JorgeM
Industrious Poster
4,023 posts since Dec 2011
Reputation Points: 297
Solved Threads: 549
Skill Endorsements: 115
You can get the value of one form element simply by using the request.form collection. For example.. If the element is name, then...
Vb.net example
Dim name as string
name=request.form("name")
Take a look at this guide for more details. Examples are close enough for asp or asp.net.
Request.Form
JorgeM
Industrious Poster
4,023 posts since Dec 2011
Reputation Points: 297
Solved Threads: 549
Skill Endorsements: 115
Ok so this is classic asp code (handler.asp). So in the handler.asp page you can access those form elements by either creating a loop and accessing all of the items, or just accesses them individually...
Request.Form("name")
Request.Form("email")
Request.Form("subject")
Request.Form("donate-amount")
JorgeM
Industrious Poster
4,023 posts since Dec 2011
Reputation Points: 297
Solved Threads: 549
Skill Endorsements: 115
do i place it just in the asp page?
No, the example I provided will most likely need to be assigned to a variable I assume. The request.form("parameter") is holding the information. You have to do something with it. For example, you can declare a variable, assign the value of that form item to the variable, then do something with it such as write it to the page...
<%
Dim email
email = Request.Form("email")
Response.Write (email)
%>
This is just an example... the correct answer depends on what you want to do with the information you passed.
Finally i want it to go to a url, where do i place the url in the code.
I dont know what you mean by this...Do you mean a hyperlink? Do you want to redirect to another page? For example <% Response.Redirect("http://www.new-domain.com") %>
JorgeM
Industrious Poster
4,023 posts since Dec 2011
Reputation Points: 297
Solved Threads: 549
Skill Endorsements: 115
Ok, i guess there is something missing here. You are posting the form to a file called handler.asp. What code do you have in that file? If you havent created that file yet and you just copied this form from somewhere, I think that is where the confusion is.
You need to write asp code in the handler.asp file. In the example I just provided, if you open a new text document and save it as "handler.asp" with this code, it should display the contents of the parameter "email" on the screen.
<%
Dim email
email = Request.Form("email")
Response.Write (email)
%>
If you are not familiar with asp, you may need to read up on it a bit more to get more familiar, otherwise its going to be rough for you to move forward and maintain the code.
JorgeM
Industrious Poster
4,023 posts since Dec 2011
Reputation Points: 297
Solved Threads: 549
Skill Endorsements: 115
Hi,
Your form Action is set to handler.asp this means the form submits to the page handler.asp for processing.
In the Handler page you do something like this:
<%
'as your using classic ASP your radio button can all be called the same thing:
dim myURL as string =""
Select Case Request.Form("Subject")
case "ten"
myURL = "/tenpage.asp" 'where ever you go if this value is selected
case "five"
myURL ="/fivepage.asp"
case else 'three
myURL ="/threepage.asp"
End Select
Reponse.redirect myURL
%>
G_Waddell
Practically a Master Poster
619 posts since Nov 2009
Reputation Points: 107
Solved Threads: 93
Skill Endorsements: 5