Use Select Case statement with String type value (VB) : Case « Language Basics « ASP.NET Tutorial






<%@ Page Language="VB" %>

<script runat="server">
   sub Page_Load(Sender as object, e as eventargs)
      dim strClockStatus As String
      strClockStatus = "AAA"   

      select Case strClockStatus
         case "AAA", "BBB", "CCC"
            Response.Write("A")
         case "DDD"
            Response.Write("B")
         case else
            Response.Write("C")
      end select
   end sub   
</script>

<html><body>

</body></html>








2.1.Case
2.1.1.Use Select Case statement with String type value (VB)
2.1.2.Use Select case statement with integer type value (VB)