Handling a select case on a web form

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?
 
S

Steve C. Orr [MVP, MCSD]

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

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top