Define control visibility

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Find Control 2
Property 1
Control Handler 2
User Control 2
Override Css Class 1
Failed to load view state 1
UserControl and ViewState Error 1
Control / Property. Going crazy here. 1

Back
Top