Instead of disabling view state control by control, you also can disable view state for the whole page. You should do so when you are not taking advantage of view state and the controls in a page contain a lot of data. To disable view state for an entire page, modify the EnableViewState attribute of the Page directive. The page in Listing 4.3 demonstrates how you would do so.
Listing 4.3 PageViewState.aspx
<%@ Page EnableViewState="False" %> <Script Runat="Server"> Sub Page_Load If Not IsPostBack Then lblMessage.Text = "Hello!" End If End Sub </Script> <html> <head><title>PageViewState.aspx</title></head> <body>