Is there a way to grab a URL parameter and use it in an ASP page and then pass it on to the next page in the URL and use it on that page also? Any help would be greatly appreciated. Thank you!
I assume by parameters you mean QueryString values? Like:
mypage.asp?a=1&b=2
If so, then yes. Querystring values can be accessed using the Request.QueryString collection. For example, for my above link I could access the varibales a and b like so:
Code:
Response.Write " A is " & Request.QueryString("a") & "<br>"
Response.Write " B is " & Request.QueryString("b") & "<br>"
If you wanted the entire querystring value (everything after the ?) then you can get it simply by calling Request.QueryString without any arguments, so to make a link that has some the same querystring values you would do somehting like:
Code:
<a href="nextpage.asp?<%=Request.QueryString%>">Go To Next Page</a>
Hope this helps,
-T
01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
Need an expensive ASP developer in the North Carolina area? Feel free to let me know.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.