Large ViewState value in ASP.NET

Jaelebi picture Jaelebi · Jul 31, 2009 · Viewed 7.3k times · Source

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?

Answer

Justin picture Justin · Jul 31, 2009

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.