visible=false

Discussion in 'ASP .Net' started by RAB, Nov 6, 2005.

  1. RAB

    RAB Guest

    I have a program that has the following code:

    <script>
    sub page load
    if not page.is postback then
    ...
    fill drop down list box
    ....
    end if

    if MyListBox.selectedItem.Text="string3"
    MyLabel.visible=false
    end if

    end sub

    sub message(s as object, e as EventArgs)
    MyLabel.text=MyListBox.selectedItem.Text
    end sub

    </script>

    My problem is once I select string3 in the list box... the label
    disappears. And when I subsequently choose other listbox items the
    label does not reappear (I would like it to reappear).

    Any help would be appreciated.

    Thanks,
    RABMissouri
    RAB, Nov 6, 2005
    #1
    1. Advertising

  2. Try the following,


    >if MyListBox.selectedItem.Text="string3"
    > MyLabel.visible=false


    ELSE
    MyLabel.visible=true

    >end if


    HTH

    Ken


    "RAB" <> wrote in message
    news:...
    >I have a program that has the following code:
    >
    > <script>
    > sub page load
    > if not page.is postback then
    > ...
    > fill drop down list box
    > ....
    > end if
    >
    > if MyListBox.selectedItem.Text="string3"
    > MyLabel.visible=false
    > end if
    >
    > end sub
    >
    > sub message(s as object, e as EventArgs)
    > MyLabel.text=MyListBox.selectedItem.Text
    > end sub
    >
    > </script>
    >
    > My problem is once I select string3 in the list box... the label
    > disappears. And when I subsequently choose other listbox items the
    > label does not reappear (I would like it to reappear).
    >
    > Any help would be appreciated.
    >
    > Thanks,
    > RABMissouri
    >
    Kenneth Windish, Nov 6, 2005
    #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. spamfurnace
    Replies:
    1
    Views:
    2,632
    Scott M.
    May 24, 2004
  2. tshad

    button visible/not visible

    tshad, Oct 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,444
    Brian Hoops
    Oct 28, 2004
  3. tshad

    Sections visible and not visible

    tshad, Jan 31, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,060
    tshad
    Jan 31, 2005
  4. Patrick Olurotimi Ige
    Replies:
    7
    Views:
    5,962
    Patrick Olurotimi Ige
    Jun 15, 2005
  5. tshad
    Replies:
    1
    Views:
    4,243
    tshad
    Oct 31, 2009
Loading...

Share This Page