As View state retains the state of a control when a .aspx page takes a round trip, but when I disable it then too the output is the same.
Example:
I type test in the text box at run time and click the Submit button then the test value is visible in textbox, as by default internally View State is maintained by the server control textbox, when I disable View State of the textbox control then too its visible.So what is the benefit of disabling it.
Example:
Code:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Submit" />
Code:
<asp:TextBox ID="TextBox1" runat="server"EnableViewState="False"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Submit" />
Comment