Handling a select case on a web form

Discussion in 'ASP .Net' started by William Gower, Apr 28, 2004.

  1. 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?
    William Gower, Apr 28, 2004
    #1
    1. Advertising

  2. 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

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "William Gower" <> wrote in message
    news:...
    > 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?
    >
    >
    Steve C. Orr [MVP, MCSD], Apr 28, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Franks
    Replies:
    2
    Views:
    1,247
    Steve Franks
    Jun 10, 2004
  2. Tee
    Replies:
    3
    Views:
    7,793
    Herfried K. Wagner [MVP]
    Jun 23, 2004
  3. Lakshmi Narayanan.R

    "Case 1 To 5" in Select case, giving Error!!. Why?

    Lakshmi Narayanan.R, Mar 2, 2005, in forum: ASP General
    Replies:
    10
    Views:
    347
    Bob Barrows [MVP]
    Mar 4, 2005
  4. aa
    Replies:
    14
    Views:
    320
  5. palmiere
    Replies:
    1
    Views:
    396
    Erwin Moller
    Feb 9, 2004
Loading...

Share This Page