ASP.NET CBool() แปลงค่าข้อความเป็นผลลัพธ์ของ Boolean
Syntax
CBool(expression)
Sample
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim A As String
Dim B As String
Dim C As String
A = 5
B = 5
C = 10
Me.lblText1.Text = Cbool(A=B)
Me.lblText2.Text = Cbool(A=C)
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Label id="lblText1" runat="server"></asp:Label><br />
<asp:Label id="lblText2" runat="server"></asp:Label><br />
</form>
</body>
</html>