Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. ModalPopupExtender confirmation not working in <asp:CommandFiel in grid view

ModalPopupExtender confirmation not working in <asp:CommandFiel in grid view

Scheduled Pinned Locked Moved ASP.NET
csssysadminhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vishnu Narayan Mishra
    wrote on last edited by
    #1

    Hi to all forum members. I am stuck in implementing ModalPopupExtender in <asp:CommandField in grid view. Although below code is working fine in <asp:template field in grid view. <asp:TemplateField HeaderText="Delete" HeaderStyle-CssClass="tableheading" HeaderStyle-Width="70px"> <ItemTemplate> <center> <asp:ImageButton ID="imgDelete" runat="server" OnClientClick="showConfirm(this); return false;" ImageUrl="~/Images/delete.png" OnClick="imgBtnDelete_Click" /></center> </ItemTemplate> </asp:TemplateField> following is my code which I am trying to implement in <asp:CommandFiel in grid view. .aspx code Grid view code <asp:CommandField HeaderText="Edit/Delete" ItemStyle-HorizontalAlign="Center" CausesValidation="false" ShowCancelButton="true" ShowEditButton="True" ShowDeleteButton="true" /> modal popup code <ajaxToolkit:ModalPopupExtender ID="md1" runat="server" BackgroundCssClass="modalBackground" BehaviorID="mdlPopup" CancelControlID="btnNo" OkControlID="btnOk" OnCancelScript="cancelClick();" OnOkScript="okClick();" PopupControlID="Confiramtiondiv" TargetControlID="Confiramtiondiv"> </ajaxToolkit:ModalPopupExtender> <div id="Confiramtiondiv" runat="server" align="center" style="display: none"> <table id="Table3" cellpadding="1" cellspacing="1" border="0" bordercolor="blue" runat="server" align="center"> <tr> <td colspan="4" align="center"> <asp:Label ID="lblConfirmmsg" runat="server" Text="Are you sure you want to delete this Trip ?" CssClass="lblConfirmmsg"></asp:Label> </td> </tr> <tr> <td width="20%"> </td> <td width="30%"> <asp:Button ID="btnOk" runat="server" Text="Yes" CausesValidation="false" Width="50px" />

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups