How to disable ViewState in web.config

ViewState is enabled by default in ASP.NET projects. If you're not going to use it, you can disable it site-wide in web.config. To do this, enter the following into your web.config file: <pages enableViewState="false"> </pages> If you already have a <pages> tag,  just add enableViewState to the end like this: <pages validateRequest="false" enableViewState="false"> </pages>