Amazon.com: PC Books || Educational Software || Magazines
Amazon: Books-CA || Software-CA || Books-UK || Software-UK

HTML | Javascript | ASP | PHP | VBScript | SQL | Hardware | PC FAQ| WinXP|

Learn to Build, Upgrade, or Repair your Computer Ebook + PC Safety 101 kwwebservice.com Reasonably priced web development & hosting
ASP Basics
Introduction
Variables & Arrays
Sub & Functions
If Statements
Case Statements
Loop Statements
Date Objects
Form Processing
Text File Objects
Database Access
Adding Record
Updating Record
Deleting Record
Virtual Includes
Cookies
Server Variables
Creating Login Page
E-mail
ASP Books @
CA Amazon
UK Amazon
US Amazon

  :: Home
PC Topics
  :: Build A PC
  :: Windows XP
  :: PC Help
Tutorials
  :: HTML
  :: JavaScript
  :: ASP
  :: PHP
  :: VBScript
  :: SQL
Miscellaneous
  :: Code/Scripts
  :: Forum
  :: Links
  :: Contact us
  :: Tell A Friend
  :: In Somali
  ::
Web Articles
  Top Web Hosting
Reviews
  Processing
Online Card Payment Guide
  Domain name
registration & buying guide
  Getting
a website online guide
  Search Engine
submission & optimization tips
Netfirms Web Hosting
Free trial
Quality business correspondence.
Yahoo! Search Marketing

ASP Case Statements

Case statement can be used instead of if statement suitably when one condition could have multiple possibilities. Following example illustrates the use of case statement
<% Dim dat
dat=WeekDay(Date)
%>
<%
Select Case dat
  case 1
    response.write("Today is Sunday")
  case 2
    response.write("Today is Monday")
  case 3
    response.write("Today is Tuesday")
  case 4
    response.write("Today is Wednesday")
  case 5
    response.write("Today is Thursday")
  case 6
    response.write("Today is Friday")
    case 7
    response.write("Today is Saturday")
  end select
%>
This example is to show the use of case statement and there is better way to show the day of the week in asp.  The variable dat is set to the day of the week and it could have values from 1 to 7, 1 is Sunday and 7 is Saturday.  Case statement is used to display the day of the week according to the value of variable dat.

If Statements Loops
Listed @ ConsumerVote.com - The Consumer Rated Web Directory
PC Articles
  Computer Safety
prevent viruses & Spyware