It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming ASP & ASP.NET Forum

IF NOT querystring

IF NOT querystring

Postby kdjuiopo on Mon Aug 01, 2011 10:07 am

I have a question on using querystrings. Is there some way to set a default value that is used when NO querystring is added to the URL?

I have a page that displays product information in a table form. I decided to make an option for the user to sort the data, so I created a variable which changes the SORT clause in the SQL statement. The variable is controlled using a querystring. So for example, "products.asp?sort=price" would sort products by price instead of model. This part works fine.

Here's where I need some help... When I initially load the page, I do not want the querystring added to the URL. I basically want to just load "products.asp" and have a default sort order. I assume I need something like "if not querystring", but I don't know if it's possible to use the presence of a querystring as an IF condition.

I'm looking for some suggestions. Any help is appreciated.
kdjuiopo
50+ Club
 
Posts: 90
Joined: Fri Jul 01, 2011 1:32 am

Who is online

Users browsing this forum: No registered users and 1 guest

cron