I've seen this posted a few times but no concrete solution or identification of the problem. I have 2 content section. The first one has buttons that should trigger an update in the second content. The second content has an UpdatePanel with the trigger definition. But I get the following error:
The ControlID property of the trigger must reference a valid control.
This is the code:
<
asp:ContentID="Content3"ContentPlaceHolderID="MainContentHeaderHolder"Runat="Server"><strong>Property Details :: Options</strong>
<div>
<asp:ButtonID="btnNewResident"Text="[New Resident]"OnClick="ViewResidentPanel"runat="server"/>
</div>
</asp:Content>
<asp:ContentID="Content4"ContentPlaceHolderID="MainContentHolder"Runat="Server">
<atlas:UpdatePanelID="upNewRecordPanels"runat="Server">
<ContentTemplate>
......
</ContentTemplate>
<Triggers>
<atlas:ControlEventTriggerControlID="btnNewResident"EventName="Click"/>
<atlas:ControlEventTriggerControlID="btnNewContactNumber"EventName="Click"/>
<atlas:ControlEventTriggerControlID="btnNewAuthorizedGuest"EventName="Click"/>
</Triggers>
</atlas:UpdatePanel>
</asp:Content>
Is there a solution or is this a bug or by design?
{Bump}
Any thoughts from anyone on this? Is it by design that you cannot cross content sections or does it need to be done a different way?
Hi
I bumped into the same problem. It makes some kind of sense, because the controls in the other content control will be loaded in a different container and from what I've seen the UpdatePanel cannot find it.
One solution would be to edit the control id to its UniqueID:
<atlas:ControlEventTriggerControlID="MainContentHeaderHolder$btnNewResident"EventName="Click"/>
or
<atlas:ControlEventTriggerControlID="ctl00$MainContentHeaderHolder$btnNewResident"EventName="Click"/>
In both cases the error disappears, but i didn't test if the trigger gets fired. An alternative would be to add the trigger from the code using the UniqueId (easier if you later need to modify the control herarchy).
Anther solution (the one i used) would be to relate the trigger to a control that gets changed inside the UpdatePanel, like a panel.Visible - you probably have one that changes, otherwise you wouldn't need to update it. Although the controls inside the content template of the update panel do not appear as choices in the designer, you can add the trigger manually in source view.
I hope this helps
Vlad