views:

401

answers:

2

I'm writing a pretty complex web form using ASP.NET Dynamic Data. Several of the controls on this form post back, since there are dependencies between controls. I'm noticing that the viewstate is growing larger with every postback, until after 5 or so there is a long delay between the Render process and the page actually loading in the web browser.

This occurs even if I'm JUST clicking a radio button to cause the postback, without entering any data or any other changes into the form...

I checked the older version of the form, which does not use Dynamic Data, and the viewstate doesn't grow at all... so I'm theorizing that the dynamic data controls are somehow to blame...

Anyone else seen this? Is there a fix for it?

+3  A: 
Chris W. Rea
cool... out "sick" today, so will try these out tomorrow.. thanks!
Telos
Gives me an error stating the viewstate is invalid... :(
Telos
+2  A: 

Ok, so the culprit was Telerik's RadComboBox. More specifically, it was the lack of support for Dynamic Data using RadComboBox. To be even MORE specific:

The workaround for using a RadComboBox with DynamicData is to have a DropDownList with visible set to false, call the PopulateListControl on that DDL and then copy the items to RadComboBox.

This works fine, except when you do that on every postback... I'm guessing it stuffs the entire list into Viewstate when you do it that way, and since I was doing it every postback... the viewstate kept growing.

Telos