Use if statement with boolean type value (VB) : if « Language Basics « ASP.NET Tutorial






<%@ Page Language="VB" %>

<script runat="server">
   sub Page_Load(Sender as object, e as eventargs)
      dim MyMessage As String = "Hello"
      dim MyBool As Boolean = True

      if MyMessage = "Hello" then
         Response.Write("True")
      end if

      if MyBool then
         Response.Write("True")
      end if   
   end sub   
</script>

<html><body>

</body></html>








2.5.if
2.5.1.Use if statement with string type value (VB)
2.5.2.Use if statement with boolean type value (VB)
2.5.3.Use if and 'if else' statement with string and boolean type value (C#)