ViewState Size Reduced, but not Completely Empty

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.
 
S

Scott Allen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top