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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Obtainig value from URL

Status
Not open for further replies.

Hattusas

Programmer
Nov 11, 2001
344
TR
How is the method of passing parameter from query string to my string variable in my ASP session?Also what is syntax of my query string?Thanks everyone.
 
querystring:

yourscript.asp?key1=value1&key2=value2&key3=value3 (etc., but you don't want your querystring too long or it will truncate, don't know the exact limit...)

then in yourscript.asp, to access the querystring values:

Dim sValue1
Dim sValue2
Dim sValue3

sValue1 = Request.QueryString("value1")
sValue2 = Request.QueryString("value2")
sValue3 = Request.Querystring("value3")

Also, if you don't set a method in your form tag, ie.:
<form name=&quot;myform&quot; action=&quot;yourstring.asp&quot; method=&quot;get&quot;>
or, if you set it to &quot;get&quot; as in the example, then your input fields will be sent over in the querystring as shown above.

Does that answer your questions?
 
Lobstah.Thanks for your time.After I searched the books I found the syntax.Of course it was same with your help.Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top