I am currently working on an ASP.NET AJAX page that is fairly sophisticated (VS 2010 and .NET 4.0 w/ VB.NET). After several initial criteria are entered on the page and submitted back to the database via AJAX, I then dynamically create sixteen RAD controls in individual PlaceHolders. Each control might be a RadTextBox, RadComboBox, RadNumericTextBox or a RadDatePicker - depending on what the database tells me to display. I have this all working fine - initially. I collect the initial data, hand it back and then display the dynamic fields - very cool through AJAX.
However this page then continues to make several AJAX round trips after these dynamic controls are generated, and the user can enter or select values in these custom controls at any point between these subsequent round trips. The user can also change the initial data parameters which will then potentially recreate all new and different custom controls. The only commonality is that there are 16 of these custom fields....
After much reading it appears that my dynamic controls are not surviving the AJAX postbacks, and must be recreated and reset each time. I believe I may need to store the Control Type, ID and SelectedValue (or Text, or Date) in the ViewState and reinitialize them on each Page_Load, but I am not sure how to go about this. Specifically:
1) How do I save the value on each control before an AJAX PostBack?
2) Are there best practices to follow for this type of interaction to optimize performance?
3) Any specific examples of this kind of interaction with the Telerik AJAX controls?
Any help or pointers appreciated.
However this page then continues to make several AJAX round trips after these dynamic controls are generated, and the user can enter or select values in these custom controls at any point between these subsequent round trips. The user can also change the initial data parameters which will then potentially recreate all new and different custom controls. The only commonality is that there are 16 of these custom fields....
After much reading it appears that my dynamic controls are not surviving the AJAX postbacks, and must be recreated and reset each time. I believe I may need to store the Control Type, ID and SelectedValue (or Text, or Date) in the ViewState and reinitialize them on each Page_Load, but I am not sure how to go about this. Specifically:
1) How do I save the value on each control before an AJAX PostBack?
2) Are there best practices to follow for this type of interaction to optimize performance?
3) Any specific examples of this kind of interaction with the Telerik AJAX controls?
Any help or pointers appreciated.