Static variable vs View State

Discussion in 'ASP General' started by Nil, Apr 9, 2008.

  1. Nil

    Nil Guest

    Hi,
    I am facing problem with the huge Viewstate size(Using .NET 2.0).
    to improve the application performance,
    I am using Static variable to store view state data.
    Does anyone has other option to improve performance or what r drawback of
    using Static variable.

    Thanks,
    Nil
    Nil, Apr 9, 2008
    #1
    1. Advertising

  2. Nil wrote:
    > Hi,
    > I am facing problem with the huge Viewstate size(Using .NET 2.0).


    There was no way for you to know it (except maybe by browsing through some
    of the previous questions in this newsgroup before posting yours - always a
    recommended practice) , but this is a classic asp newsgroup. ASP.Net bears
    very little resemblance to classic ASP so, while you may be lucky enough to
    find a dotnet-knowledgeable person here who can answer your question, you
    can eliminate the luck factor by posting your question to a group where
    those dotnet-knowledgeable people hang out. I suggest
    microsoft.public.dotnet.framework.aspnet or the forums at www.asp.net.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Apr 9, 2008
    #2
    1. Advertising

  3. "Nil" <> wrote in message
    news:...
    > Hi,
    > I am facing problem with the huge Viewstate size(Using .NET 2.0).
    > to improve the application performance,
    > I am using Static variable to store view state data.
    > Does anyone has other option to improve performance or what r drawback of
    > using Static variable.
    >


    Like Bob says there are much better places to ask this question.

    However to answer your question, Static isn't likely to be the solution.
    Static variables are held globally across the application. View state is
    maintained for a single client.

    View state can easily get out of control. Google: Reduce Viewstate



    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Apr 9, 2008
    #3
    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. kookey
    Replies:
    3
    Views:
    20,741
    Andrew Thompson
    Aug 20, 2005
  2. Patrick Hoffmann
    Replies:
    3
    Views:
    2,815
    Christian Jan├čen
    Aug 8, 2003
  3. CK
    Replies:
    1
    Views:
    673
    Galcho[MCSD.NET]
    May 23, 2006
  4. Nil

    Static Variable vs View State

    Nil, Apr 9, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    1,062
    Peter Bromberg [C# MVP]
    Apr 9, 2008
  5. Parthiv Joshi
    Replies:
    1
    Views:
    646
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page