Update Panel triggers don't work on controls that are in different content placeholders - by ChrisErickson

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


0
0
Sign in
to vote
ID 385950 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 12/1/2008 8:19:19 AM
Access Restriction Public

Description

If I have 2 content placeholders, one containing controls and another containing an asp:UpdatePanel, and I attempt to set an async update trigger via. the designer / markup for the updatepanel to trigger on a control in the other content placeholder, I get a runtime error:

"A control with ID '...' could not be found for the trigger in UpdatePanel 'UpdatePanel1'"

I am able to work around the issue by creating the AsyncUpdateTrigger during page load and using the Control.UniqueID property rather than Control.ID
Sign in to post a comment.
Posted by Trapulo on 10/9/2009 at 4:25 AM
Dreed's solution works well... great!
Posted by InfinitiesLoop on 12/3/2008 at 5:46 PM
This is expected behavior.

Triggers work when you specify the ID of a control in a different naming container, as long as the target's naming container is one of the UpdatePanel's parent naming containers, because there is no ambiguity there. However in your example, DropDownList1 is inside an additional naming container. This makes "DropDownList1" an ambiguous ID -- how would UpdatePanel tell the difference between multiple DropDownList1's in different Content controls, for example? To dis-ambiguate, you must specify an ID that includes any naming container IDs that are between the naming container the UpdatePanel and target share and the parent naming containers of the target. In this example, Content1$DropDownList1 would do it, assuming Content1 is ID of DropDownList1's naming container.

Posted by Microsoft on 12/2/2008 at 1:19 AM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Posted by Microsoft on 12/2/2008 at 1:19 AM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team