asp.net panel's visible property not working properly

Discussion in 'ASP .Net' started by Jeff, Mar 3, 2004.

  1. Jeff

    Jeff Guest

    Hi all,

    I have a panel which I can't set to be visible. I explicitly set
    panel.Visible = true, but when I debug and go over that line, the
    watch window still displays it as false. Even trying to change the
    Visible property to true in the watch window doesn't work. It just
    changes back to false as soon as I hit return. Any ideas? I'm really
    stumped on this.
    Jeff, Mar 3, 2004
    #1
    1. Advertising

  2. Jeff

    MrCeri

    Joined:
    Jul 17, 2006
    Messages:
    4
    Location:
    UK
    (I realise the original post is several years old, but I found it via a search engine, so I thought I'd give an explanation in case anyone else arrives here with the same problem.)

    As I understand it, ASP.NET controls can only have their visibility set to true if their parent control is also set Visible=true.

    So in the example given, it's quite possible that you can't set the panel's visibility to true if the panel's parent control has its visibility set to false.

    This isn't very well documented, and has caught me out in the past.

    Hope this helps,

    Cheers,
    Ceri
    MrCeri, Dec 7, 2007
    #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,059
    tshad
    Jan 31, 2005
  4. Patrick Olurotimi Ige
    Replies:
    7
    Views:
    5,961
    Patrick Olurotimi Ige
    Jun 15, 2005
  5. Jurjen de Groot
    Replies:
    0
    Views:
    300
    Jurjen de Groot
    May 19, 2008
Loading...

Share This Page