13.4. What a State

ASP.NET MVC does not use viewstate. Viewstate is used in ASP.NET WebForms applications to maintain the state of controls such as the item that is selected in a drop-down menu between page posts.

By default in ASP.NET, all controls have viewstate, which can bloat pages and slow an application down. Viewstate is often unnecessary; by removing it, you can reduce page size and increase the speed of the application because the web server no longer has to parse it and load control state.

Partly because of the lack of viewstate (and because it is kind of missing the point of ASP.NET MVC), you probably should not be using standard ASP.NET controls such as <asp:hyperlink /> in your MVC application. That's not to say these controls ...

Get Introducing .NET 4.0: with Visual Studio 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.