Sunday, March 25, 2007

Atlas: Assertion Failed: Could not find an HTML element with ID “ContentView_PageLayout_xxxx_xxxx” for control of type “Sys.UI.Control”

This is a common error in atlas when you put a atlas updateProgress inside a panel with panel.visible = false. Toggling panel is a common task when you create a wizard like application. Therefore, in order to make it happen, all is needed is to put a dummy reference to the updateprogress control's clientId.

Which looks something like...

<asp:Panel id="dummyControlPanel">
<div id=ctl00_SomePage_controlName" />
</asp:Panel/>

Now, with the script manager's partial rendering set to true, atlas framework wont complain about that anymore, but before turning on the actual panel that holds the progress panel, you have to set dummyControlPanel.Visible= false, so that altas framework does not get confused in initializing control with duplicate Id.

No comments: