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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top