Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 544.8k

User Control Modal Popup

Aug 23 2024 10:29 AM

Hi

 I have modal popup in below User Control file. How i will call it on click of Delete button

 

             htmlTable.Append("<td class='text-center'><a id='btnEdit' class='list-icons-item text-primary-600' data-toggle='modal' data-backdrop='static' data-keyboard='false' data-target='#modal_form_horizontal' onclick='BindData(this);'><i class='icon-pencil7 mr-1'></i></a>  <a id='btnDel' class='list-icons-item text-danger-600' data-toggle='modal' data-target='#modal_Delete' onclick='BindData(this);'><i class='icon-bin mr-1'></i></a></td>");

------------------------


<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MBox.ascx.cs" Inherits="Payroll.MBox" %>

<script type="text/javascript">
    var swalInit = swal.mixin({
        buttonsStyling: false,
        confirmButtonClass: 'btn btn-primary',
        cancelButtonClass: 'btn btn-light'
    });

    
</script>

<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <h5 class="modal-title">
                <asp:Label ID="ltrlDelHead" Text="Are You Sure, You want to Delete This?" runat="server"></asp:Label>
            </h5>
            <button type="button" class="bootbox-close-button close" data-dismiss="modal" aria-hidden="true">×</button>
        </div>
        <div class="modal-body">
            <div class="bootbox-body">
                <div class="bootbox-form">
                    <!-- Dynamic content can be placed here if needed -->
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-link" data-dismiss="modal">Cancel</button>
            <asp:LinkButton ID="lnkRecordDelete" CssClass="btn bg-danger" runat="server" OnClick="lnkRecordDelete_Click">Delete</asp:LinkButton>
        </div>
    </div>
</div>

Thanks

Thanks


Answers (2)