Do invisible controls and their children on an ASP.NET page contribute to viewstate?
Posted
by
Mr. Jefferson
on Stack Overflow
See other posts from Stack Overflow
or by Mr. Jefferson
Published on 2012-12-05T16:58:18Z
Indexed on
2012/12/05
17:03 UTC
Read the original article
Hit count: 241
I have an ASP.NET page that has about 40 custom controls embedded in it. The controls vary in size; in their .ascx files, the biggest is about 1,500 lines and the smaller ones are between 100 and 200 lines (markup, script, etc).
Each control is contained in a Panel
. Only one of these panels is ever visible at any one time, which means only one control is ever visible at one time.
My question is this: do the controls that are invisible still send ViewState for themselves and all their children to the client? It makes sense that they might have to serialize the fact that they're invisible, but not all the state info for their children...
© Stack Overflow or respective owner