title: If else statement in vb
body: <p>I have a button and i want it to check for a condition to display different msgbox. </p>
  
  <p>Below is my code:</p>
  
  <pre><code> Dim a As String = "";
  
  Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
      If ((a = "a") &amp; (DetailsSelectedComment.Visible = True)) Then
          MsgBox("Have")
      Else
          MsgBox("No have")
      End If
  
  End Sub
  </code></pre>
  
  <p>But i got the following error when i clicked on the button.</p>
  
  <p>"Input string was not in a correct format. "</p>