Optimizing ViewState

Discussion in 'ASP .Net' started by Ben Fidge, Feb 17, 2005.

  1. Ben Fidge

    Ben Fidge Guest

    Does anyone know any tricks for reducing the size of the ViewState?

    Kind regards

    Ben
     
    Ben Fidge, Feb 17, 2005
    #1
    1. Advertising

  2. Ben Fidge

    Karl Seguin Guest

    Ben,
    The question is on the vague side. Turn on tracing, see what's using
    viewstate and see if you can make it work without. if your page doesn't
    postback, you can turn viewstate off at the page level.

    Check out Scott Guthrie's deck on performance
    http://scottgu.com/PerformanceEurope.zip it touches briefly on viewstate.

    A nice compression module can help mitigate the performance issues around
    round-triping large viewstate
    (http://www.blowery.org/code/HttpCompressionModule.html)

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Ben Fidge" <> wrote in message
    news:...
    > Does anyone know any tricks for reducing the size of the ViewState?
    >
    > Kind regards
    >
    > Ben
    >
    >
    >
     
    Karl Seguin, Feb 17, 2005
    #2
    1. Advertising

  3. Ben Fidge

    Ben Fidge Guest

    Thanks Karl,

    I'll have a look.

    Ben


    "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
    wrote in message news:...
    > Ben,
    > The question is on the vague side. Turn on tracing, see what's using
    > viewstate and see if you can make it work without. if your page doesn't
    > postback, you can turn viewstate off at the page level.
    >
    > Check out Scott Guthrie's deck on performance
    > http://scottgu.com/PerformanceEurope.zip it touches briefly on viewstate.
    >
    > A nice compression module can help mitigate the performance issues around
    > round-triping large viewstate
    > (http://www.blowery.org/code/HttpCompressionModule.html)
    >
    > Karl
    >
    > --
    > MY ASP.Net tutorials
    > http://www.openmymind.net/
    >
    >
    > "Ben Fidge" <> wrote in message
    > news:...
    >> Does anyone know any tricks for reducing the size of the ViewState?
    >>
    >> Kind regards
    >>
    >> Ben
    >>
    >>
    >>

    >
    >
     
    Ben Fidge, Feb 17, 2005
    #3
  4. Things that will considerably reduce your viewstate size :-

    1) Disable viewstate for those controls that are going to get populated
    everytime a page loads.
    2) Disable viewstate for the page if the page does not postback to itself.
    3) Viewstate can store a type that either is serializable or has a
    TypeConverter defined for it can be persisted in ViewState. However, types
    that are only serializable are slower and generate a much LARGER ViewState.
    Hence reduce the number of only serializable types.


    Best of Luck



    "Ben Fidge" wrote:

    > Does anyone know any tricks for reducing the size of the ViewState?
    >
    > Kind regards
    >
    > Ben
    >
    >
    >
    >
     
    =?Utf-8?B?U2hhdW4=?=, Feb 18, 2005
    #4
  5. hey one more site to help you with compressing the viewstate.

    http://www.mostlylucid.co.uk/archive/2004/01/03/694.aspx


    "Shaun" wrote:

    > Things that will considerably reduce your viewstate size :-
    >
    > 1) Disable viewstate for those controls that are going to get populated
    > everytime a page loads.
    > 2) Disable viewstate for the page if the page does not postback to itself.
    > 3) Viewstate can store a type that either is serializable or has a
    > TypeConverter defined for it can be persisted in ViewState. However, types
    > that are only serializable are slower and generate a much LARGER ViewState.
    > Hence reduce the number of only serializable types.
    >
    >
    > Best of Luck
    >
    >
    >
    > "Ben Fidge" wrote:
    >
    > > Does anyone know any tricks for reducing the size of the ViewState?
    > >
    > > Kind regards
    > >
    > > Ben
    > >
    > >
    > >
    > >
     
    =?Utf-8?B?U2hhdW4=?=, Feb 18, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Rush
    Replies:
    2
    Views:
    532
    Ben Rush
    Dec 5, 2003
  2. Steph
    Replies:
    2
    Views:
    1,667
    heislord5
    May 11, 2011
  3. ujjc001
    Replies:
    0
    Views:
    1,373
    ujjc001
    Jul 27, 2005
  4. sck10
    Replies:
    6
    Views:
    919
    sck10
    Sep 1, 2006
  5. mark

    Viewstate errors... how do I get viewstate working?

    mark, Feb 20, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    279
Loading...

Share This Page