Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opinions please 1

Status
Not open for further replies.

crystalized

Programmer
Jul 10, 2000
390
CA
Is there a way that I can use the same ASP page to generate all my basic pages where the ASP may be called with or without a querystring. What I mean is that should someone get a hit on a search engine I would want the ASP page to generate the default "home" page (and no query string would be attached). If the user clicks one of the links on the site to navigate to say the "about" page I would send a query string that would contain a variable for which page to generate. The content and specific information would be stored in a database table.

I know that the basic idea can easily be done, the part I am unsure of is whether I can test to see if there is a query string or not. I have not really used querystrings much and I expect i am going to have to start using them for some of the things I need to do. I am going back to read a few things on query strings that I have seen.

So I guess my question is, does anyone percieve that I will find this more difficult than it is worth, with the potential for different query strings and with the content in a database? [sig]<p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
[/sig]
 
Dear Crystal,

> the part I am unsure of is whether I can test to see if
> there is a query string or not.

Yes.

> does anyone percieve that I will find this more difficult
> than it is worth

With IIS5 and the new Server side redirection capability, the difficulty negligible.

&quot;But, that's just my opinion... I could be wrong&quot;.
-pete [sig][/sig]
 
Crystal,
To see if there's a querystring:

if len(request.querystring) > 0 then
<your code here>
end if

or to test for a specific value in the querystring:

if request.querystring(&quot;whichpage&quot;)=&quot;pageone.asp&quot; then
<use response.redirect (IIS4) or response.transfer(IIS5) to go to pageone.asp>
end if
[sig]<p>nick bulka<br><a href=mailto: > </a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top