ViewState Size Reduced, but not Completely Empty

  • Thread starter Thread starter Jeff S
  • Start date Start date
J

Jeff S

I'm trying to optimize performance of a few pages. Toward this result, I
have done the following:
1. set EnableViewState="false" and EnableSessionState="false" in the @ Page
directive.
2. set EnableViewState="false" in the @ Control directive of two user
controls that appear on the page
3. set EnableViewState="false" for each of 16 imageButtons that are declared
on the page.

Just wondering why I still see a long string stored in __VIEWSTATE when I
view the source of the page from IE (View | Source). Completing the steps
listed above significantly reduced the size of the __VIEWSTATE content, but
it still contains more than 800 bytes). What could still be storing
information in ViewState?

Thanks in advance.
 
If you dont need to post back you can remove the runat="server" from
the form tag - this should eliminate viewstate completely.

Even when you disable viewstate at the page level there is still a
little left behind by the page - but 800 bytes seems a bit excessive.
 
Back
Top