Do invisible controls and their children on an ASP.NET page contribute to viewstate?
- by Mr. Jefferson
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...