I get the follow message box when any postback action is taken inside an update panel:
An async postback was caused by a control within UpdatePanel '$TestPanel' but the panel could not be found in the page.I was having no trouble out of the December release, and the update panel that it says it can't find is there (minus the $). I would appreciate any ideas on a fix.
Got it. I fibbed a bit in my previous post, the $TestPanel isn't their exactly, it's missing the underscore I prefix my control ids with. It appears this bug was introduced in the January release.
As soon as I renamed my UpdatePanel from "_TestPanel" to "TestPanel", everything worked as expected.
Hi Nick,
How do you rename from _TestPanel to TestPanel ? Please help me I have the same problem.
Can you post a quick sample repro of what failed for you?
Create the following in page, notice the Update Panel's ID is prefixed with a "_".
<form id="form1" runat="server">When you run this sample, and push the button, you should get the error described in the first post. Now, take out the underscore in the Update Panel's name, like this:
<atlas:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" />
<div>
<atlas:UpdatePanel ID="_Test" Mode="Always" runat="server">
<ContentTemplate>
<asp:TextBox ID="_SomeTextBox" runat="server">
</asp:TextBox>
<asp:Button ID="_SomeButton" runat="server" />
</ContentTemplate>
</atlas:UpdatePanel>
</div>
</form
<form id="form1" runat="server">Run it again, and it error is gone.
<atlas:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" />
<div>
<atlas:UpdatePanel ID="Test" Mode="Always" runat="server">
<ContentTemplate>
<asp:TextBox ID="_SomeTextBox" runat="server">
</asp:TextBox>
<asp:Button ID="_SomeButton" runat="server" />
</ContentTemplate>
</atlas:UpdatePanel>
</div>
</form
OK, thanks for the sample Nick. Essentially, the code in the server looking for the Panel is not handling the leading "_".
Just to follow up, this happens any time part of the UpdatePanel's ID has an underscore in it, not just a leading underscore. This also happens if you have other naming containers, such as Content controls in Master Page scenarios, that have underscores in their names.
For the meantime, just remove the underscores. This issue will be fixed in a future release of Atlas.
Thanks,
Eilon
Does this problem happen for other reasons? I have made sure that I have no underscores in any of my master/content/container controls, but I still get that message. The difference is that in my page source, the update panel is named with underscores like: "_ctl0_cphMain_upMyPanel", but in the JS alert window, its referred to as "$ctl0$cphMain$upMyPanel".
The weird thing is that the update panels update when a control event for a control that is NOT in an update panel is fired. The only time it throws the alert is when a control WITHIN one of these update panels is fired.
ANY help is appreciated! Thanks!!!!!!
--
tb
Hi tb,
The problem is happening because of "_ctl0" - though I'm not sure what control that is. If you can figure out what control that is, give it a specific name so that it doesn't get autogenerated to "_ctl0".
Thanks,
Eilon
I think this might be a bug with master pages. the cphMain part of that control id is the content placeholder on my master page. that would lead me to believe that the "_ctl0" is coming from something outside of that tag.
I have tried to change the form name on the master page, since thats the only server control that surrounds my content placeholder (cphMain), but when the controls are rendered, every single one of them has a "_ctl0" at the front of the id, and the rendered form id is still "aspnetForm".
Any thoughts? Thanks!
No comments:
Post a Comment