Ideal viewstate size


“How big is too big a ViewState?”

"The ideal size for a viewstate is around
7 KB; it is optimal if you can keep it down to 3 KB or so. In any case, the viewstate, no matter its absolute size, should never exceed 30% of the page size." [Dino]

ViewState is enabled on four levels: machine, application, page, and control. The machine and application levels are controlled by configuration file settings, while the page and control ViewState settings are controlled by properties. Most sites that use ASP.NET will use ViewState in at least portions of the site, so turning it off at the machine or application level often is not feasible. Therefore, ViewState must be handled carefully at the page and control levels.

Comments

Popular posts from this blog

30+ GitHub Products & Key Ecosystem Features You Should Know in 2026

Uncle Bob vs. Grady Booch: Rethinking Code Reviews in the Age of AI

Compact Business PCs Explained: Dell OptiPlex, Intel NUC and Lenovo ThinkCentre Tiny Desktops Compared