Last post Feb 06, 2016 10:52 PM by David C. Holley
Jan 16, 2016 08:52 PM|David C. Holley|LINK
I noticed that the size of one of my pages was particularly large. I snooped around the View State and noticed That this object has 306 members all from the same repeater. The specific members are listed as
0. Key: "ctl00$main$ctl100$RepeaterProjectGateway$ctl213$ListViewProjectContacts", Value: "System.Web.UI.Pair"
How is this being added to the viewstate? EnableViewState="False" is set on the ListView and also on the control.
Jan 16, 2016 10:39 PM|markfitzme|LINK
Viewstate for the page can be over-ridden by controls. Controls can also have their own ControlState, which was a concept introduced in the 2.0 framework. http://forums.asp.net/post/set/22/2082800/6011156
Jan 20, 2016 08:38 AM|Chris Zhao|LINK
In many situations, ASP.NET View State becomes very large especially when your ASP.NET application has a lot of rich and heavy controls and widgets on its pages. This results in a lot of data traveling back and forth between your browser and the web server.
to reduce the ViewState.
Turn on HTTP compression on the server (IIS)
Compress the ViewState
Store the ViewState on the server
Take a look at
Understanding ASP.NET View State
Feb 01, 2016 05:54 PM|David C. Holley|LINK
Please note my original question: "How is this being added to the viewstate?
EnableViewState="False" is set on the ListView and also on the control."
Feb 04, 2016 04:30 AM|markfitzme|LINK
As was already mentioned, controls can actually over-ride that. Starting with ASP.Net 2.0, the concept of a control-state entered into the environment. Controls can save state necessary even if you tell them not to. I would guess one of the parent controls
does have viewstate enabled, though in some cases ASP.Net knows it's useless to turn it off as that prevents certain functionality from working.
Feb 06, 2016 10:52 PM|David C. Holley|LINK
I've changed the control and the parent repeater from EnableViewState = False to ViewStateMode = Disabled to no avail.