简体   繁体   English

更新面板上的按钮单击事件未在多个用户控件中触发

[英]button click event on update panel not firing in multiple user control

I am having an update panel which user control in it 我有一个由用户控制的更新面板

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <ContentTemplate>
         <uc1:SelectionAjax ID="SelectionAjax1" runat="server" />
         <ppmp:PinPadModal ID="ppmodal" runat="server" />
   </ContentTemplate>
 </asp:UpdatePanel>

and inside this user control I am calling another two user controls each user control which has its own update panel 在这个用户控件中,我正在调用另外两个用户控件,每个用户控件都有自己的更新面板

// First User Control
    <asp:UpdatePanel ID="UpP1" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnFinalConfirmation" EventName="Click" /> 
            </Triggers>
       <ContentTemplate>
         <asp:Button ID="btnFinalConfirmation" runat="server" Text="Confirm"  OnClick="btnFinalConfirmation_Click1" />
       </ContentTemplate>
     </asp:UpdatePanel>

//Second User Control
        <asp:UpdatePanel ID="UpPanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
           <ContentTemplate>
             <asp:Button ID="btnConfirmation" runat="server" Text="Confirm"  OnClick="btnConfirmation_Click1" />
           </ContentTemplate>
         </asp:UpdatePanel>

The issue is that button click event is only being fired on the second user control not the first one how should I solve this 问题是,仅在第二个用户控件上而不是第一个用户控件上触发按钮单击事件,我该如何解决这个问题

在您的Aspx页面中包含ScriptManager 。此ScriptManager控件在启用AJAX的网页中提供对客户端AJAX功能的支持。

<asp:ScriptManager ID="ScriptManager1" runat="server"/>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Asp:更新面板内的按钮单击事件未触发 - Asp:Button click event inside update panel not firing 在ASP.NET更新面板中未触发按钮单击事件 - Button click event is not firing inside Update Panel of ASP.NET 使用更新面板(更新面板外部的按钮)时,不会触发Click事件 - Click event is not firing when using update panel , the button outside the update panel 由于WebForm_DoPostBackWithOptions,用户控件中的按钮单击事件未触发 - Button click Event in user control not firing because of WebForm_DoPostBackWithOptions 在更新面板中放置链接按钮不会触发链接按钮的click事件 - placing link button inside update panel not firing the click event of link button 通过自定义服务器控件呈现的更新面板内的单击事件按钮未触发 - Buttons on click event, inside an update panel, rendered through a custom server control not firing WPF:按钮控件模板不触发点击事件 - WPF: button control template not firing click event 单击Button控件事件中未触发的图像 - Click image within Button control event not firing 当在网格视图内的更新面板内时,Asp 图像按钮单击事件不会为所有行触发 - Asp image button click event not firing for all row when it is inside a update panel which is inside a grid view 单击此用户控件内的按钮后,动态更新更新面板内的用户控件消失 - Dynamically user control inside update panel disappear after click button inside this user control
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM