Handling a select case on a web form

  • Thread starter Thread starter William Gower
  • Start date Start date
W

William Gower

I have a form where I display a textbox depending on a value in a field. In
the asp verision I did a Select Case and depending on whether the field
concerned was a 1, 2 or 3, I display different labels and textboxes. How do
I handle this in asp.net?
 
You could do it pretty much the same way. Something like this:

Select Case MyVar
Case 1
TextBox1.Visible=True
TextBox2.Visible=False
Case 2
TextBox1.Visible=False
TextBox2.Visible=True
End Select
 
Back
Top