Forum Moderators: open

Message Too Old, No Replies

Links like "go.asp?hell"?

         

Bant

9:58 pm on Apr 23, 2006 (gmt 0)

10+ Year Member



Hello,

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]

txbakers

2:58 am on Apr 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think what you are asking is whether you can use just a word as a QueryString, or if you need a parameter and the word.

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

Woz

3:01 am on Apr 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using ASP you can request the entire query string, such as request.querystring, or paticular criteria contained withing the querystring, such as request.querystring("to").

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