Partial Class BooleanExamples Inherits System.Web.UI.Page 'page load method: Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load 'Boolean statements: Dim FreshSushi As Boolean = True FreshSushi = False Dim ipodIsOn As Boolean = False ipodIsOn = True 'Comparison Operators Dim EqualStrings As Boolean = ("abc" = "xyz") 'false EqualStrings = ("abc" <> "xyz") 'true Dim Greater As Boolean = (1 > 2) 'false Dim GreaterOrEqual As Boolean = (2 >= 2) 'true Dim Lesser As Boolean = (1 < 2) 'true Dim LesserOrEqual As Boolean = (1 <= 2) 'true 'Logical Operators Dim Boolean1 As Boolean = (4 > 8) And (3 >= 3) 'false Dim Boolean2 As Boolean = ("abc" = "abc") Or (7 < 5) 'true 'output to the webpage output1.Text = "The output from the page load method is: " & Boolean2 End Sub 'button click method: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click 'input from user: Dim Num1 As Integer = input1.Text Dim Num2 As Integer = input2.Text 'are the two values equal? Dim Result As Boolean = (Num1 = Num2) 'output to the webpage output2.Text = "The result from the button click method is: " & Result End Sub End Class