In looking for a way to trim down viewstate, I came across the
following articles to store viewstate in session:
http://aspalliance.com/72
http://msdn.microsoft.com/library/d...
rst.asp
It appears as if the first link is actually better as it allows for a
"history" of viewstates to be availabale.
Anyone have experience using either one of these methods?
Thanks."emde" <emdeusenet@.yahoo.com> wrote in message
news:1161638474.044477.141050@.b28g2000cwb.googlegroups.com...
> In looking for a way to trim down viewstate, I came across the
> following articles to store viewstate in session:
> http://aspalliance.com/72
> http://msdn.microsoft.com/library/d...r />
tPrst.asp
>
> It appears as if the first link is actually better as it allows for a
> "history" of viewstates to be availabale.
> Anyone have experience using either one of these methods?
ViewState, as with hundreds of other features of ASP.NET, is extremely
useful when it's extremely useful.
But let's not get too carried away here - ViewState *does* add a bit of
overhead to every page which uses it, but unless the page is huge with loads
and loads of WebControls and HTMLControls, it's probably not going to make
that much of a difference to most users. It's just text after all. The page
may take a second or so longer to load, but that's about it...
If the page is huge with loads and loads of WebControls and HTMLControls,
then it's been badly designed in the first place, so ViewState really is the
least of your worries...:-)
There are loads and loads of ways to improve the performance of ASP.NET
sites, but ViewState is IMO opinion fairly far down the list.
By all means be aware that it's always a "good thing" to minimise the amount
of traffic between server and client and back again, so set
EnableViewState="false" for all those controls which don't need it - but
it's really not necessary to devote any more time to it than that...
Mark Rae wrote:
> There are loads and loads of ways to improve the performance of ASP.NET
> sites, but ViewState is IMO opinion fairly far down the list.
>...
> By all means be aware that it's always a "good thing" to minimise the amou
nt
> of traffic between server and client and back again, so set
> EnableViewState="false" for all those controls which don't need it - but
> it's really not necessary to devote any more time to it than that...
While I agree with you, I am working with the wizard control and
viewstate gets out of hand really quick :)
"emde" <emdeusenet@.yahoo.com> wrote in message
news:1161639998.986367.317610@.e3g2000cwe.googlegroups.com...
> Mark Rae wrote:
>
>
> While I agree with you, I am working with the wizard control and
> viewstate gets out of hand really quick :)
Hmm - it shouldn't if you're careful... You really only need to enable
ViewState on the controls within the individual panels...
That said, I really don't like the Wizard control / <asp:MultiView> control
for just this reason...
It also makes client-side validation almost impossible because only the
controls in the current panel are actually streamed down to the client...
I really wish Microsoft had come up with something along the lines of the
old IE:WebControls for this in ASP.NET 2...I realise that they were for IE
only but, in an enclosed corporate intranet where all client machines are
running IE, the IE:WebControls were truly superb...
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment