Learn to use select case in your asp pages using this example in vbscript. Often times select case can have distinct advantages over If Else End If.
True Type Fonts
Download thousands of free fonts.
Download Here.
Device Drivers
DirectX
VBrun Files
By Peripheral:


All Drivers
Dll Search
Download Dll Files
Enter The Dll Name:
Paco's Screensaver
Download The Official Paco's Drivers Screensaver.
Check It Out
Computer Maintenance
File Systems
Hardware
Over Clocking
Registry
Surf 2X Faster
Desktop Enhancements
Anime
Icons
Screensavers
Themes
Site Search:

Free Software
Anti-Virus
Audio Tools
E-Mail Clients
Firewalls
Graphic Editors
Web Development
ASP/VBScript
CGI Script
HTML
JavaScript
Paco's Own Scripts
Webmasters Tools
Were Listed @

Aspin.com

ScriptSearch.com

Select Case Example

Many times we need to perform an action or display something different based on some different parameters. Using select case is one such way to do this. Below is an example of how this can be done.

Lets say you have a three different choices in a dropdown box named choices.  For example a user will choose either 1, 2 or 3. Now based on the selection they make you want to show three different tings. An easy way to do this is in the code below:

<%

Dim whichOne

'here we are getting the number from the dropdown
whichOne = Request.Form("choices")

'now we will use this to make our desicion
Select Case whichOne

Case 1
'if whichOne is one we do this
Response.Write "You selected one"
Case 2
'if whichOne is two we do this
Response.Write "You selected two"
Case 3
'if whichOne is three we do this
Response.Write "You selected three"
Case Else
'otherwise we tell them they did not make a choice
Response.Write "You did not make a choice, go back and do so now."
End Select

%>

An alternative to select case is IF End If and is more suited to fewer choices. Learn about IF statements here.


Search The Web Using Paco's MetaSearch
  
any   all   phrase
 About  Factmonster  AlltheWeb   
 MSN  Yahooligans      
Arts
Movies, Television, Music...
Business
Jobs, Industries, Investing...
Computers
Internet, Software, Hardware...
Games
Video Games, RPGs, Gambling...
Health
Fitness, Medicine, Alternative...
Home
Family, Consumers, Cooking...
Kids and Teens
Arts, School Time, Teen Life...
News
Media, Newspapers, Weather...
Recreation
Travel, Food, Outdoors, Humor...
Reference
Maps, Education, Libraries...
Regional
US, Canada, UK, Europe...
Science
Biology, Psychology, Physics...
Shopping
Autos, Clothing, Gifts...
Society
People, Religion, Issues...
Sports
Baseball, Soccer, Basketball...
World
Deutsch, Español, Français, Italiano, Japanese, Nederlands, Polska, Svenska...
Help build the largest human-edited directory of the web
Stop Popups
Paco's Popup Plucker.
Eliminate those pesky popups!
Users Online
Currently 45 users at PacosDrivers.com
Paco's Online

Send this page to a friend
Report Broken Links
Bad or missing query parameters in request.
Hosted By
ChamberGates

Privacy Policy
Best Viewed At 1024 X 768 Or Higher
Copyright © 2000-2008 Pacosdrivers.com. All Rights Reserved.