Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 516.5k

Pass Parameters to User Control Dynamically

Aug 28 2024 11:36 AM

Hi

  I have below code and i want to pass multiple parameters to User Control . In User Control i have modal defined

                        string deleteAttributes = Status == "Blocked" ? "style='pointer-events: none; opacity: 0.5;' onclick='return false;'" : "data-toggle='modal' data-target='#modal_Delete' ";
                        htmlTable.Append($"<a id='btnDel' class='list-icons-item text-danger-600' data-recno='{recno}' data-sp = '{sp}' { deleteAttributes}><i class='icon-bin mr-1'></i></a>");
<div id="modal_Delete" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">
                    <asp:Label ID="Label1" 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">
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-link" data-dismiss="modal">Cancel</button>
                <%--<asp:LinkButton ID="lnkDelete" class="btn bg-danger" runat="server" OnClick="lnkRecordDelete_Click">Delete</asp:LinkButton>--%>
            </div>
        </div>
    </div>
</div>

Thanks


Answers (1)