Connecting Tech Pros Worldwide Forums | Help | Site Map

Opposite Statement

Newbie
 
Join Date: Apr 2008
Location: Santa Barbara, CA
Posts: 12
#1: Nov 7 '08
Hi everyone,

Is there a way in ASP I can make a switch? For example I need to make a link to sort a recordset either ASC or DESC. I can accomplish this with some javascript but it gets a little complicated when I add my AJAX function.

Can ASP handle an opposite condition? I'm thinking an if statement within a Case? As you can tell from my scattered post i'm completely lost on this and any help is much appreciated :)

jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Nov 8 '08

re: Opposite Statement


Quote:

Originally Posted by sbryguy

Hi everyone,

Is there a way in ASP I can make a switch? For example I need to make a link to sort a recordset either ASC or DESC. I can accomplish this with some javascript but it gets a little complicated when I add my AJAX function.

Can ASP handle an opposite condition? I'm thinking an if statement within a Case? As you can tell from my scattered post i'm completely lost on this and any help is much appreciated :)

you mean you want to know how to write a "select case" in asp?
Expand|Select|Wrap|Line Numbers
  1. select case request("sortOrder")
  2.    case "ASC"
  3.       query = query & " Order by " & sortField + " ASC"
  4.    case else
  5.       'do whatever else
  6. end select
Let me know if this is what you are looking for.

Jared
Reply


Similar ASP / Active Server Pages bytes