Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Static variable vs View State

Reply
Thread Tools

Static variable vs View State

 
 
Nil
Guest
Posts: n/a
 
      04-09-2008
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

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      04-09-2008
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"


 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      04-09-2008
"Nil" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static Variable vs View State Nil ASP .Net 3 04-09-2008 05:38 PM
Maybe a static method and/or View State? CK ASP .Net 1 05-23-2006 03:30 PM
non-static variable this cannot be referenced from a static context kookey Java 3 08-20-2005 07:43 PM
How to make a week view and day view calendar just like month view calendar in .NET ? Parthiv Joshi ASP .Net Web Controls 1 07-06-2004 03:15 PM
a static local variable in a static method is thread local storage? Patrick Hoffmann C++ 3 08-08-2003 02:37 PM



Advertisments