Click to See Complete Forum and Search --> : unsure


nickeby
01-14-2003, 11:19 AM
I have started working with ASP, well since yesterday.. :) I have been reading all of the pages on ASP at htmlgoodies.com and I have a perty decent grasp on it. Well theres something that I didn't See in his totorials.

I was looking at a page ( http://www.artofwarcentral.com ) there main page is default.asp well thats fine but when you click on the sidebar like say clicking on General Info It adds the ?action=info&cmd=default and it brings up a completely different page. I figure he is useing SSI to link pages to the default.asp But how do I do this?

Bullschmidt
01-14-2003, 01:56 PM
Example URL with a querystring:
http://www.mysite.com/mydir/mypg.asp?myvar1=hey&myvar2=ho

Because a variable might contain some odd characters like spaces, it's usually a good idea to use Server.URLEncode when creating a querystring from a variable:
<a href="http://www.mysite.com/mypage?id=<%= Server.URLEncode(objRS("MyIDFldFromDB")) %>">objRS("MyIDFldFromDB")</a>

And in the page that is opened you can use Request.QueryString("id") to get the value of id.

nickeby
01-14-2003, 03:50 PM
So What I was talking about is called a Querystring? Hmmm I really need to find a book on ASP. Thanks alot for your help.

Bullschmidt
01-14-2003, 03:55 PM
And here are a few good ASP sites:
o ASP101 (See the Samples Section) - http://www.asp101.com
o 4GuysFromRolla - http://www.4guysfromrolla.com
o Microsoft VBScript Language Reference - http://msdn.microsoft.com/scripting/default.htm?/scripting/VBScript/doc/vbscripttoc.htm