Can the ViewState be optimized to reduce pages' size?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hello,

Some of you tried to disable the ASP.NET ViewState on certain "read-only" controls to reduce the size of the pages?
I'm using Nop 1.90.

http://msdn.microsoft.com/en-us/library/bb386448.aspx

Thank you.
Best regards.
12 years ago
Hi,

There are certainly a lot of posts here in the forums on ViewState.

I ran across them when looking up nop's use of ViewState, regarding the new "Hash Collision" vulnerability found in all versions of asp.net.

The most I could see, is to disable it for a whole page, and then enable it for certain controls that need it.

Most of the nopCommerce pages probably use it, but for the many custom pages we've had to make, we've disabled it on the top page declaration, and then you can see it goes from HUGE to very small.

<%@ Page ViewStateMode="Disabled"

Then, if there is a control on your page that needs to persist it's info you enable it specifically:

<asp:Button ViewStateMode="Enabled"


Good luck,

David
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.