Re: viewstate?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Steven Cheng[MSFT] (v-schang_at_online.microsoft.com)
Date: 07/09/04


Date: Fri, 09 Jul 2004 02:20:21 GMT

Hi Brian,

AS for the large Viewstate problem you met, I think Bruce's suggestions are
informative and reasonable. Generally the Page's ViewState will contains
all the controls' viewstate on the page. And most control only perisist
their particular display settings(properties) in ViewState. However, the
ASP.NET Template dataBinding controls such as DataGrid, DataList.....
will store all the binded datas(rows ) into the ViewState, that means if
the datagrid contains lots of rows of data, the ViewState will also
increase to a very large size. Here are some tech articles discussing on
the ASP.NET's ViewState and some have mentioned the performance concerns:

#Understanding ASP.NET View State
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html
/viewstate.asp

#Taking a Bite Out of ASP.NET ViewState
http://msdn.microsoft.com/library/en-us/dnaspnet/html/asp11222001.asp?frame=
true

# Improving ASP.NET Performance
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/
scalenetchapt06.asp

Hope helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx



Relevant Pages

  • Re: ViewState in a dynamic control
    ... while wrestling with a bug in the Repeater and DataGrid (see the post ... ViewState to bind to, and, I believe, is subsequently used to determine ... The problem with many templated databound controls is that many ... CreateChildControls might get called before LoadViewState occurs. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET with Datasets
    ... the postbacked viewstate is used to re-create the ... controls are recreated. ... Before or after that you bind the datagrid, you set the dataset in the ... At a postback, you set the session.item back in the dataset, which you (to ...
    (microsoft.public.dotnet.framework.adonet)
  • Adding a row without rebinding, reloading ViewState
    ... I'm looking for a way to add a row to DataGrid without binding the data ... new set of controls is created with the values from the datasource. ... values in ViewState, as follows: ... restore the ViewState for those controls once again. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: Kill ViewState !!!
    ... via ViewState. ... > but not DataGrid itself. ... Automatically posting controls are only those ... > c) You could have a ViewState Optimizer ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET application load time after some change
    ... The speed can also be affected by how much stuff is in viewstate. ... as Labels or Controls who have their value set in the Load event have no ... because the compiler only needs to compile it once. ... web.config) that can increase or decrease load time? ...
    (microsoft.public.dotnet.framework.aspnet)