Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does the "?" mean in this line of code...

Status
Not open for further replies.

dduva

Programmer
May 16, 2001
38
US
Response.Redirect("ams_zip.asp?action=Next")

I am new to ASP/VBscript. I understand the response.redirect and the ams_zip.asp is the the web page, but I don't understand the ?action=Next.

Thanks in advance.
 
The ? indicates that there are Request.QueryString variables to follow. In this particular instance, it is being redirected to the ams_zip.asp page, and there is a variable called "action" whose value is "Next". The ? separates the name of the page from the variables that follow in the query string. HTH Insanity is merely a state of mind while crazy people have a mind of their own.
 
The question mark just shows what is in the query string. This is a method to pass variables onto another page. The refering page is passing the variable "action" to the page ams_zip.asp with the value "next". This is most likely a processing page on which there is a method called next. Anytime you want to pass variables onto another page, you can simply append them to the url in the following manner:

Code:
somePage.asp?someVariable=something&anotherVariable=anotherThing

and so on. If you want to pass the variables from a form in the url like this, you set up the form to submit with the method "get". If you do not want the user to see all the variables you are using in the url, you can use the method "post". An example:

Code:
<form name=&quot;someForm&quot; action=&quot;ams_zip.asp&quot; method=&quot;Post&quot;>

This would pass all the variables to the ams_zip.asp page without appending them on to the url. Plus, it makes the address look cleaner.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top