Answer: With the help of Count property of ViewState statebag,we can check how many Viewstate has been used in a Page.It returns total ViewState in number.
For Example:-
int viewstate_count = Convert.ToInt32(ViewState.Count);
It will show the Number of ViewState used in a Page.
Asked In: Many Interviews |
Alert Moderator