ViewState size

Sep 22, 2008 at 8:24 AM

Thanks for a excelent work! I've played a bit with your product, it seems to load content much more faster than Microsoft UpdatePanel, but I've also found one interesting thing:
Please monitor the ViewState which is sending when you click on page number at DataBinding section of your sample (a grid with paging enabled). The size of the ViewState is larger than the VievState of the whole sample page. If you put asp:UpdatePanel on the same page and place the same DataBindingsSample inside - you'll see that the ViewState which is sent by asp:UpdatePanel is less than ViewState, sent by your panel. Thus, we don't get any advatnage in terms of reducing the traffic, but still loading itself remains faster (page doesn't goes through the whole cycle).

Do you know what can generate extra data for ViewState (or ViewState generating approach is not optimal)?
Sep 25, 2008 at 2:43 PM
Hi grown,

thank you for your comment!
You discovered an interesting point. But I can explain why this bigger ViewState is generated:

I use the OnClientClick-Properties for Button, LinkButton and ImageButton to call a javascript-method that does the partial PostBack.
Unfortunally the OnClientClick-Properties for all these Controls are stored in the ViewState of these Controls.
And this is the reason for the grown ViewState.

I think if you have a page with a big viewstate, the use of the PartialUpdatePanel would be produce less traffic even with the OnClientClick issues.

So the bigger overhead using PartialUpdatePanel will only exist in small test pages that does not have a big viewstate itself.

But I tried to solve this problem and will upload an update that will shorten the call statement with in OnClientClick so the ViewState will be reduced.

Again, thanks for this useful comment!
Sep 29, 2008 at 1:42 PM
Hello iucon,

Thanks for the comprehensive feedback! Yes, I've noted that on the "real" page your panel works better than Microsoft UpdatePanel. Actually, even due to the absence of the whole page life-cycle, it reduces server load as well.

Thanks again for the nice product, I'll try to use it in some scenarios and see how it works in "real world" :).
Sep 29, 2008 at 1:45 PM
Hi grown,

I will provide a small bugfix for the version I deployed last week.
So please be sure, that you use the version I will upload today.