The request function, surprisingly, requests a value. This could be a URL variable, form variable, or some other value. For example if you were at the url.
http://www.somepage.com/home.asp?ID=23
You would use the following code in your script.
Request.QueryString("ID")
The line would then return the value 23.
An example of where this can be used is on the M World News channel. The news is stored dynamically in a database so when you click on a link to the full story from the news homepage you are taken to a dynamic page which selects the story based on the ID of the story you want passed to the page as a url variable. For example the link could be as follows.
http://www.mworld.us/news/story.asp?ID=52
Examples of use
Request.QueryString("SomeURLVariable") Request.Form("SomeFormElement") Request.Cookies("SomeCookie")
Don't have time to check my blog? Get a weekly email with all the new posts. This is my personal blog, so obviously it is 100% spam free.
Tags: asp, get, request, variables
This entry was posted on Wednesday, December 29th, 2004 at 2:13 pm and is filed under Programming, Tech. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.