Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...ViewStateViewState
Previous
 
Next
New Post
8/25/2011 11:47 AM
 
Hi,

Just wondering if the ViewState can be lowered.
http://www.cardsave.net/member-benefits

If you view the source of this page and any Dot Net Nuke website I believe, the ViewState is like 30k characters big. Is there a need for this or could it be lowered?

Thanks,

Dane
 
New Post
8/25/2011 12:01 PM
 
it can be reduced and it's something we'll be looking at -however this is one problem in that DotNetNuke has only a main page (default.aspx) and it enables viewstate so disabling viewstate on controls gets ignored (http://weblogs.asp.net/despos/archive/2009/06/13/asp-net-4-0-more-control-on-viewstate-management.aspx) due to a bug in versions of .net prior to 4.0. As DotNetNuke only needs .net 3.5sp1 (and until 5.2.0 could use .net 2.0) we havent spent the effort to do this yet. However as more and more people are on .net 4.0 it's definately something we're going to look at doing sooner rather than later.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/25/2011 1:20 PM
 
cathal connolly wrote:
it can be reduced and it's something we'll be looking at -however this is one problem in that DotNetNuke has only a main page (default.aspx) and it enables viewstate so disabling viewstate on controls gets ignored (http://weblogs.asp.net/despos/archive/2009/06/13/asp-net-4-0-more-control-on-viewstate-management.aspx) due to a bug in versions of .net prior to 4.0. As DotNetNuke only needs .net 3.5sp1 (and until 5.2.0 could use .net 2.0) we havent spent the effort to do this yet. However as more and more people are on .net 4.0 it's definately something we're going to look at doing sooner rather than later.

It's not correct to say that disabling viewstate on controls get ignored. The article is a little confusing. If you disable the viewstate on one or more controls the page viewstate is going to be reduced. The article gives the impression that this is not the case. 

I have disabled the view state in all my custom modules, and it helps a lot. The size of the viewstate is typically in the 1-3k range for all my sites. I blame the remaining viewstate on the DotNetNuke menu/navigation provider and the page containers (Content Pane div, and so on). Adding a core DNN module to a page will inflate the ViewState instantly. It would help a lot if DotNetNuke core developers started to make conscious decisions on wether the viewstate is necessary in their code. There is no reason to wait for ASP.NET 4.0.

Tip: Turn the viewstate off. If something stops working, find out why. If there is no alternative, turn it back on. But, in most cases there is an alternative. Most of the ViewState is just cached data from the database. It should be kept in the DNN cache and/or recreated from the database. 
    

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...ViewStateViewState


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out