
ASP.net: EnableViewState when, why on what control
By: a guest on
Feb 27th, 2012 | syntax:
None | size: 0.48 KB | hits: 25 | expires: Never
<asp:Label ID="ErrorMessageLabel" EnableViewState="false" runat="server" />
<asp:Label ID="TitleLabel" runat="server" Text="Update this Employee" />
If Not IsPostBack AndAlso myEmployeeObject.IsNew Then TitleLabel.Text = "Create a new Employee"
<asp:Label ID="TitleLabel" runat="server" Text="Update this Employee" EnableViewState="false" />
If myEmployeeObject.IsNew Then TitleLabel.Text = "Create a new Employee"
void Button1_Click()
{
label1.text += " more!";
}