Sunday, March 11, 2012

UpdatePanel breaks DataList

Hi tommcata,

I have the exact same problem...everything is working without the updatepanel. When i put the datalist inside the updatepanel the edit command works but the cancel and update dont.

Would appreciate any help on this.

Thanks in advance.


What that I have found since the original post:

This problem is caused by controls that are not visible when the page is originally loaded. As an experiment, I pre-selected a row in my DataList so that the Edit Template would be used on one row when the page is rendered. I then compiled and ran the page. The Update and Cancel buttons, along with the validation controls, ran find for the row; the row was updated and the row went to the Item Template display as expected. I clicked on that same row, and it went to the Edit Template as expected. I changed some entry and clicked the Update button. Again, everything worked great. I then clicked on a different row, which went to the Edit Template as expected. When I clicked on the Update button, the update fired as expected, however, I got a Microsoft JScript runtime error: 'null' is null or not an object.

This leads me to wondering "how do I register a control with the ScriptManager if the controls are on a UserControl used in a Content Page and the ScriptManager is on the MasterPage?"


Tommcata, you can drop a ScriptManagerProxy into your UserControl and register it that way.


I should have mentioned that I tried that. For the record, the user controls will not compile without their own ScriptManagerProxy since the master page has the ScriptManager on some AJAX of it's own.


I seem to be experiencing similar behavior with a Datalist, SQLDataSource, and Tab control (within content pages of a master page with it's own Updatepanel).

The datalist bahaves exactly as you describe, both in and out of the Tab control.

Have you resolved your issue yet?


No solution as of right now. I had to abandon using AJAX until a solution is found.


Have you solved your problem ?

Post it if solved

No comments:

Post a Comment