How can I disable viewstate in my ASP.NET page for most controls, but allow some controls to still use ViewState?
I have tried:
- In the properties I change
EnableViewState=false - Use
<%@ Page Language="C#" EnableViewState="false" ... >at the top of the page
But how do I enable some controls to still allow viewstate?
I am using .NET 4.
I found a way, but only use this in the .NET framework 4. Put this in page directive:
and use this for each controls that want to save the Viewstate (For example):