Select Case is a condition to choose his advantage is the only export, a lot of time he is much better than if else oh.
<script language= "VBScript" runat= "Server" >
Sub Select1 ()
Dim Varweek ' Declare variable
Varweek=weekday (now ()) ' Get an integer representing the day of the week
Response.Write ("<center>") ' Middle display
Font size displayed by Response.Write ("<font size=10>")
Select Case Varweek ' Select Case Conditional selection statement
Case 1 ' Varweek has a value of 1
Response.Write ("Today Sunday")
Case 2 ' Varweek has a value of 1
Response.Write ("Today Monday")
Case 3 ' Varweek has a value of 2
Response.Write ("Today Tuesday")
Case 4 ' Varweek has a value of 3
Response.Write ("Today Wednesday")
Case 5 ' Varweek has a value of 4
Response.Write ("Today Thursday")
Case 6 ' Varweek has a value of 5
Response.Write ("Today Friday")
Case 7 ' Varweek has a value of 6
Response.Write ("Today Saturday")
End Select ' Select Case statement closing flag
Response.Write ("</font>")
End Sub
</script>
<title>example18</title>
<body>
<%
Select1
%>
</body>
The syntax for the SELECT statement is as follows:
Select Case Expression
Case Label_1
Statements_1
Case Label_2
Statements_2
...
Case Else
Statements_n
End Select
For more details please see: http://www.111cn.net/asp/2/0ad10f01d7e31bbfce58e3700b98c897.htm
<%
Sub Getstar (Hybuycount)
Select Case Hybuycount
Case 1
Response.Write "Case 3
Response.Write "Case 5
Response.Write "Case 10
Response.Write "Case 20
Response.Write "Case Else
Response.Write "End Select
End Sub
%>