Padding Padding
Janet
Systems
 Register  Login 
Telephone  01628 566 178
Website Design, Hosting and Software Services
  Search 
Padding
corner Padding corner
Padding Padding
corner Padding corner
 ASP Articles

The Select statement provides us with an easy method by which to perform one of a number of action, based on the value of a variable.  For example, we may be preparing a page which will be reached with a variable in the querystring defining the selection made and the action to perform.

The format of the Select statement is:

<%
Select case = request.querystring("Action")
    case "Edit"
        ...
    case "Delete"
        ...
    case "New"
        ...
    case else
        ...
End Select 'case = request.querystring("Action")
%>

Adding a comment next to the closing closing End Select will help when debugging your code.

It is as well to add the encompassing else line, even if there is no content.  At the time of debugging the program a simple output statment such as response.write("case else") may prove helpful.


This article viewed: 951 times Back

Copyright © 2004-2007 Janet Systems Ltd.

 Print   

DotNetNuke Website design and hosting from £15.00 per month. More...

Looking for a website design company in the Thames Valley, call us on 01628 566178

DotNetNuke Modules
DotNetNuke Modules availalble from Janet Systems

DotNetNuke Skins
DotNetNukeSkins.gif

from Janet Systems

Padding
Copyright 2002-2008 Janet Systems Ltd.   Terms Of Use  Privacy Statement Tuesday, May 13, 2008