Always Provide a Case Else
Written by Eric Smith, Northstar Computer Systems LLC
When using the Select Case statement, always have a Case Else that will pick up any cases not matched in your list. Even if you're sure that extraneous values can't be processed by your code, it's a good idea to include a Case Else, as shown here:
<%
Select Case intTest
Case 1:
' do something
Case 2:
' do something else
Case Else:
' this is probably an error, so
' display an appropriate message
End Select
%>
Keywords: [
ASP Syntax
]
Publication Date: 7/1/1999, Last Update: 2/12/2010
|