I need to completely disable ViewState for a .aspx page inside my web application. I have gone through different blogs and what I understand is that we must set <%@ Page EnableViewState="false" ...%>
, but this is not working.
Is this enough to disable ViewState for all the controls inside the page? Or should I make any additional modifications? If so, please specify them. I don't want the ViewState enabled for even a single control inside the .aspx page
Disabling View State
<Machine.config> <system.web> <pages enableViewState="false" /> </system.web> </Machine.config>
/web.config
file.<configuration> <system.web> <pages enableViewState="false" /> </system.web> </configuration>
<%@ Page Language="C#" .. EnableViewState="false" .. %>
<asp:TextBox EnableViewState="false" ID="Name" runat="server"></asp:TextBox>