Hi all,
How to minimize viewstate size of a page in asp.net? Please help.
Hi all,
How to minimize viewstate size of a page in asp.net? Please help.
You cannot minimize the size of the ViewState. It's ASP.NET which serializes/deserializes. Though you could selectively disable ViewState for controls that don't need it.
You can turn on compression on the server to minimalize size of data transfered through the network or save viewState to disk and never send it to the client.
You have several options to reduce the ViewState:
Most of the points are highlighted within the other answers. Here's one that might be helpful:
Reduce the number of server controls (e.g. web/html controls) especiall those you do not need. Use simple HTML markups instead.
I've seen too many cases of redundant Table/Row/Cell Web Controls where normal < table >, < tr > and < td > will do.