Guest User

ASP.net: EnableViewState when, why on what control

a guest
Feb 27th, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <asp:Label ID="ErrorMessageLabel" EnableViewState="false" runat="server" />
  2.  
  3. <asp:Label ID="TitleLabel" runat="server" Text="Update this Employee" />
  4.  
  5. If Not IsPostBack AndAlso myEmployeeObject.IsNew Then TitleLabel.Text = "Create a new Employee"
  6.  
  7. <asp:Label ID="TitleLabel" runat="server" Text="Update this Employee" EnableViewState="false" />
  8.  
  9. If myEmployeeObject.IsNew Then TitleLabel.Text = "Create a new Employee"
  10.  
  11. void Button1_Click()
  12. {
  13. label1.text += " more!";
  14. }
Add Comment
Please, Sign In to add comment