![]() |
|
|
The QuerystringHave you ever seen a webpage that doesn't look like the standard www.codefixer.com
you type into the address bar. Maybe something like: ![]() ![]() Create a file called 'querystring.asp' and paste the code below into it. Let me explain what this code will do. There will be 3 hyperlinks <a href....> when you click on one of these, all the links will take you to the same page though through the querystring you are passing a value .. and that value will hold your color. Once that link has been clicked and the querystring holds a value ( Request.querystring("value") <> "" ) then write out the value of request.querystring("color") which will we be the color you chose. Just note that in the following example that the links and the values in the querystring are going to the same page (we are using only one page). Therefore if the querystring doesn't hold a value then display all the links otherwise if it does hold a value write out that value as the fav color. <%@ Language="VBscript" %> Note you may want to send more than one value through the querystring. Below is how a link to the page 'querystring.asp' would send the values of name and sex. <a href="querystring.asp?name=michael&sex=male">link</a>
Site developed by Michael Wall - Web Design Belfast N.Ireland. |
|