Forum Moderators: open
I want to use some subpages in my asp page like "go.asp?example". But I hate using querystrings like "go.asp?to=example". I know it is possible. ( For an example : [openwiki.com...] Look at the links they're like [openwiki.com...] ) Any help? Thanks.
[edited by: Xoc at 11:16 pm (utc) on April 25, 2006]
So, you want to do this: www.example.com?Load and have the page do something.
This is perfectly acceptable, but you have to code for it.
Anything after the? is called the QueryString. In your code you would ask:
if (Request.QueryString = "Load") then
do something
end if
This works fine if you only have one item in your query string to check.
BUT, if you need to send multiple parameters, you need the = :
www.example.com?name=Buddy&age=15&color=red
Now you have three parameters in the same querystring, and you need to reference them as follows:
if (Request.QueryString("name") = "Buddy") then
do something for Buddy
end if
If you querystring only contains one value then you can simply retrieve the whole string and deal with it as is. IF there are multiple value whoever, then you can either request each value independantly, or retrieve the whole string and parse it within your asp code.
Make sense?
Onya
Woz