How to check how many Viewstate has been used in a Page?

 Posted by vishalneeraj-24503 on 12/25/2013 | Category: ASP.NET Interview questions | Views: 1010 | Points: 40
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 

Comments or Responses

Login to post response