Using Request in ASP
Sunday, September 16th, 2007 | Programming, Tech
The request function, suprising requests a value. This could be a query string, form variable, or some other value. For example if you were at the following URL.
http://www.somepage.com/home.asp?ID=23
And you had a script as such.
Request.QueryString("ID")
The call would 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 databasde 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:
http://www.mworld.us/news/story.asp?ID=52
Examples of use:
Request.QueryString("SomeURLVariable")
Request.Form("SomeFormElement")
Request.Cookies("SomeCookie")
The request function, suprising requests a value. This could be a query string, form variable, or some other value. For example if you were at the following URL.
http://www.somepage.com/home.asp?ID=23
And you had a script as such.
Request.QueryString("ID")
The call would 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 databasde 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:
http://www.mworld.us/news/story.asp?ID=52
Examples of use:
Request.QueryString("SomeURLVariable") Request.Form("SomeFormElement") Request.Cookies("SomeCookie")