Search code examples
c#asp.netviewstate

Large ViewState value in ASP.NET


I am building an application in ASP.NET 2.0 and the value for the view state is huge:

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTExNz...

The value contains 535,000 characters. Is this normal? How can I make it smaller?


Solution

  • Look into enabling ASP.NET tracing for your web pages - that will tell you what controls are storing how much in view state. You can then go and disable view state for controls that you know aren't using it.