Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
1.33/5 (2 votes)
See more:
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.

XML
<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>
Posted
Updated 19-Apr-15 23:55pm
v2
Comments
Have you tried like this...

<asp:AsyncPostBackTrigger ControlID="btnYes" EventName="Click" />

1 solution

UpdateMode="Conditional"

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900