1. Using EnableViewState property we only have 2 options we can turn off view state altogather, or Enable viewstate for the entire page and then turn it off on a control-by-control basis.
2. If you want to turn of ViewState for the entire page and only enable it for specific control on the page, then we have to use ViewStateMode property in conjunction with EnableViewState.
3. ViewSteteMode property is introduced in ASP.NET 4, where as EnableViewState exist from a long time.
4. If EnableViewState is to true, only then the ViewStateMode setting are applies, where as , if EnableViewStete is set to False then the control will not save its view state, regardless of the ViewStateMode setting. In short if EnableViewState set to False, ViewStateMode setting is not respected.
Liked By
Write Answer
Difference between EnableViewState and ViewStateMode properties
Join MindStick Community
You have need login or register for voting of answers or question.
Niraj Kumar Mishra
25-Aug-20172. If you want to turn of ViewState for the entire page and only enable it for specific control on the page, then we have to use ViewStateMode property in conjunction with EnableViewState.
3. ViewSteteMode property is introduced in ASP.NET 4, where as EnableViewState exist from a long time.
4. If EnableViewState is to true, only then the ViewStateMode setting are applies, where as , if EnableViewStete is set to False then the control will not save its view state, regardless of the ViewStateMode setting. In short if EnableViewState set to False, ViewStateMode setting is not respected.