ASP.NET彻底禁用ViewState
在ASP.NET页面头部设置EnableViewState=”false”并不能彻底禁用ViewState,要彻底禁用ViewState,需要重写两个函数:
protected override void SavePageStateToPersistenceMedium(object viewState)
{
// do nothing
}protected override object LoadPageStateFromPersistenceMedium()
{
return null;
}