How can I get an UpdatePanel to intercept a CompositeControl's DropDownList

后端 未结 3 1525
花落未央
花落未央 2021-02-11 10:05

I have a CompositeControl that contains a DropDownList.

I have set the AutoPostBack property of the DropDownList to true.

On the page, I have:

&l         


        
3条回答
  •  粉色の甜心
    2021-02-11 11:00

    I made the following at the end of the BuildControlHierarchy:

            ...
            if (DesignMode || Page == null) return;
    
            var sm = ScriptManager.GetCurrent(Page);
            if (sm == null)
            {
                throw new MissingFieldException("The ScriptManager is needed on the page!");
            }
            sm.RegisterAsyncPostBackControl();
    

提交回复
热议问题