title: If Statement with Boolean Condition
body: <p>I've got some really simple code in visual studio that, for whatever reason, is not working.  I've narrowed the problem down to my boolean condition in the if statement.  Here is a simplified version:</p>
  
  <pre><code>Dim bool As boolean
  
  Protected Sub Button1Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
  If bool = true Then
      bool = false
  ElseIf bool = false Then
      bool = true
  End If
  Label1.Text = bool
  End Sub
  </code></pre>
  
  <p>This is within a button click event.  If bool is initially set to true, when I click it, it goes to false, but then if I click it again the "bool = false" statement is not executed. </p>
  
  <p>Edit: As asked, the full button click handler has been added to the code above. As asked, this is for an asp.net website.  The point of this code is to, on a button click, change the style of a header element on a button click.  However, this has no effect on the question, as I took that code out temporarily to reduce any potential problems and was left with the code above.      </p>