How can we control ViewState globally?

 Posted by vishalneeraj-24503 on 12/13/2013 | Category: ASP.NET Interview questions | Views: 1818 | Points: 40
Answer:

In the Pages section inside web.config file,we can set EnableViewState property to True/False,which will be applied in all the pages in an application.

For Example:-

To enable/disable a ViewState,in web.config file write:-

<configuration>


<system.web>

<pages enableViewState="false">

</system.web>

</configuration>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response