Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Viewstate value size is HUGE

  1. #1
    Vegarari is offline Member
    Join Date
    Nov 2006
    Posts
    35

    Question Viewstate value size is HUGE

    Hi all,
    We are working on some general optimization & SEO and came across a problem with the viewstate value being extremely large. Like 53,340 characters! 52KB worth. That is 21% of the entire page size!

    Why? What makes the viewstate so large? Does anybody know? Would Vortx please comment on this?
    There are a couple other threads on this. One is a solution but is for ML 8 and does not apply to MS 9.3.
    http://forums.aspdotnetstorefront.co...bottom-of-page

    The word on the street is this value should be a fraction of that size. I see many other ASPDNSF MS stores in the 1200-1600 character range.

    Can it be pushed to the bottom of the page?

    Can the viewstate be stored on the server? Has anybody done this?

    Any insight on this subject would be greatly appreciated.
    Thanks,
    Casey,

    MS 9.3.0.0 - Next stop MS 9.3.1.0

  2. #2
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    Viewstate is the part of an ASP.Net page that stores the state of the page so that when a round-trip is made to the server (like when a button is pressed) the value of the various form fields or data grids isn't lost. In many cases viewstate isn't needed because the data can readily be reloaded from the server at less 'cost' to both the server and the client. However, ASPDNSF doesn't pay close attention to viewstate, leaving it on (the default) when it can easily be turned off with no detriment to the page. There are lots of articles about how to understand and use viewstate; I'm sure Vortex will eventually get to cleaning up the code in that way.

    As for now, I would suggest that you ignore the viewstate as you don't want to be changing a whole bunch of ASPDNSF code just to save a few KB here and there and make future upgrades more difficult.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM