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

  2. Jeff

    MrCeri

    Joined:
    Jul 17, 2006
    Messages:
    4
    Likes Received:
    0
    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. Advertisements

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,864
    Scott M.
    May 24, 2004
  2. RSB
    Replies:
    0
    Views:
    466
  3. tshad

    button visible/not visible

    tshad, Oct 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,778
    Brian Hoops
    Oct 28, 2004
  4. Guest
    Replies:
    1
    Views:
    435
    Guest
    Aug 24, 2006
  5. Masudur
    Replies:
    0
    Views:
    1,156
    Masudur
    Dec 19, 2006
  6. mh

    ASP.Net Datagrid Not Working Properly

    mh, Jun 19, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    224
  7. Nick Poulis
    Replies:
    2
    Views:
    299
    Nick Poulis
    May 29, 2005
  8. Jurjen de Groot
    Replies:
    0
    Views:
    590
    Jurjen de Groot
    May 19, 2008
Loading...