C# 使用用户控件中的控件添加updatepanel触发器

C# 使用用户控件中的控件添加updatepanel触发器,c#,asp.net,C#,Asp.net,在有人将此标记为重复之前,我已经查看了关于此的所有其他问题,只有一个间接地解决了我正在尝试做的事情,但由于某些原因,它不起作用 我在嵌入主页的用户控件中有一个Telerik下拉菜单控件(用户控件不是动态加载的) 正如我在其他帖子中看到的那样,我做了以下工作: AsyncPostBackTrigger trigger = new AsyncPostBackTrigger(); trigger.ControlID = ribbonMain.menuDomainSelect.ID;

在有人将此标记为重复之前,我已经查看了关于此的所有其他问题,只有一个间接地解决了我正在尝试做的事情,但由于某些原因,它不起作用

我在嵌入主页的用户控件中有一个Telerik下拉菜单控件(用户控件不是动态加载的)

正如我在其他帖子中看到的那样,我做了以下工作:

    AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
    trigger.ControlID = ribbonMain.menuDomainSelect.ID;
    trigger.EventName = "ItemClick";
    upnlPanelContent.Triggers.Add(trigger);
此代码运行正常,但在加载页面时出现错误:

A control with ID 'menuDomainSelect' could not be found for the trigger in UpdatePanel 'udpnlContentTitle'. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.InvalidOperationException: A control with ID 'menuDomainSelect' could not be found for the trigger in UpdatePanel 'udpnlContentTitle'.
我在一个更新面板中有下拉列表,但我还想触发另一个更新面板来更新页面中的内容。它们被设置为条件更新


我在上看到的其他示例在母版页中有一个用户控件,所以我不明白为什么这不起作用

你的答案可能在这里,请检查:我正在做同样的事情,但它不起作用。我试着将它放在init和load事件中,当代码被命中时,两者都没有给出错误,但是一旦页面被呈现,它就会失败。