Define control visibility

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shapper

    Define control visibility

    Hello,

    What is the difference of adding a control to a page and setting its
    visible property to false or not adding it?

    Is it not the same in terms of the generated layout?

    I suppose the difference is that the added control is added to the
    viewstate even if invisible. Is this right?

    Thanks,

    Miguel
  • Teemu Keiski

    #2
    Re: Define control visibility

    Hi,

    non-visible control exists fully at server-side, it just doesn't participate
    in rendering. Not adding a control means that control doesn't exist at all
    as it doesn't participate control lifecycle etc etc

    --
    Teemu Keiski
    AspInsider, ASP.NET MVP




    "shapper" <mdmoura@gmail. comwrote in message
    news:52e15882-b887-49c7-b735-1560d9dfa603@26 g2000hsk.google groups.com...
    Hello,
    >
    What is the difference of adding a control to a page and setting its
    visible property to false or not adding it?
    >
    Is it not the same in terms of the generated layout?
    >
    I suppose the difference is that the added control is added to the
    viewstate even if invisible. Is this right?
    >
    Thanks,
    >
    Miguel

    Comment

    Working...