如何解决触发事件未触发按钮 [英] How to solve Trigger Event not fired button

查看:101
本文介绍了如何解决触发事件未触发按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用在web应用程序的html页面中更新面板,所以Button使用触发器但没有触发是按钮。

是按钮点击意味着没有解雇这是我的问题请帮助我。



update Panel using in html page in web application so Button using trigger but not fired yes button.
Yes Button Click means not fired this is my problem please help me.

<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">
    <ContentTemplate>
    <asp:Panel ID="pn2" runat="server" Visible = "true"  BackColor = "Bisque" Width = "770px">
                <table id="tblPopup" runat="server">
                                <tr>

                                <td>
                                   <asp:Label ID="lblEmployeeREjected" runat="server"   Text="are u sure want to delete current employee. Press Yes to Delete and No to cancel"

                                    Font-Bold="True" ForeColor="#3E3EFF" Width="770px" BackColor="White" Visible="false" ></asp:Label>

                                </td>
                                </tr>

                                <tr>
                                   <td align = "center">
                                      <asp:Button ID="btnYes" runat="server" OnClick="btnYes_Click" Text="Yes"  CausesValidation="false"

                                Width="50px"  />
                                <asp:Button ID="btnNo" runat="server" OnClick="btnNo_Click" Text="No"  CausesValidation="false"

                                 Width="50px" />
                                   </td>
                                </tr>
               </table>
                </asp:Panel>
      <asp:ModalPopupExtender ID="MPE" runat="server" PopupControlID="pn2" TargetControlID="tblPopup" PopupDragHandleControlID="header" BehaviorID="btnYes"

 BackgroundCssClass="Bg">
            </asp:ModalPopupExtender>
    </ContentTemplate>
    <Triggers>
    <asp:PostBackTrigger ControlID="btnYes" />
    <%--<asp:PostBackTrigger ControlID="btnYes" />
<asp:PostBackTrigger ControlID="btnNo" />--%>
<%--<asp:AsyncPostBackTrigger ControlID="btnYes" />
--%>    </Triggers>
    </asp:UpdatePanel>

推荐答案

UpdateMode =有条件的



< asp:postbacktrigger controlid =btnYesevent =点击xmlns:asp =#unknown>
UpdateMode="Conditional"

<asp:postbacktrigger controlid="btnYes" event="Click" xmlns:asp="#unknown">


这篇关于如何解决触发事件未触发按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆