This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

ASP.net: EnableViewState when, why on what control

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.48 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data