I need to show gridview in model page on button click, the page is poping but not showing data. please guide
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<asp:UpdatePanel ID="upContent" runat="server">
<ContentTemplate>
<div id="divButtons">
<table class="table table-bordered ">
<tr>
<td style="text-align: center;">
<button type="button" class="btn btn-primary " data-toggle="modal" data-target="#myModal" id="lnkSearch">Show Product</button>
</td>
</tr>
</table>
</div>
<div class="modal fade" id="myModal" onload="lnksearch_click" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true" >
<div class="modal-dialog modal-dialog-centered">
<div class="modal-dialog modal-dialog-centered" role="document">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Search Product</h4>
</div>
<div class="modal-body">
<div class="box-body table-responsive">
<div class="row" id="divSearch" runat="server" visible="true">
<asp:GridView ID="gvPaymentHistory" runat="server" CssClass="table table-bordered table-hover dataTable"
AutoGenerateColumns="false" DataKeyNames="MemberFeeID" ShowFooter="false">
<Columns>
<asp:TemplateField HeaderText="ID" SortExpression="ID">
<ItemTemplate>
<asp:LinkButton ID="lblMemberLoanID" runat="server" CommandName="Select"
CommandArgument='<%#Eval("MemberFeeID").ToString + "," + Eval("MemberID").ToString + "," + Eval("MonthID").ToString%>' OnClick="lnkEditFeePayment_Click"
Text='<%# Bind("MemberFeeID")%>'>
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="TransDate" SortExpression="TransDate" HeaderText="Trans Date" DataFormatString="{0:dd-MMM-yyyy}"></asp:BoundField>
<asp:BoundField DataField="MonthName" SortExpression="MonthName" HeaderText="Month Name" ></asp:BoundField>
<asp:BoundField DataField="Debit" SortExpression="Debit" HeaderText="Debit" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n2}"></asp:BoundField>
<asp:BoundField DataField="Credit" SortExpression="Credit" HeaderText="Credit" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n2}"></asp:BoundField>
<asp:BoundField DataField="RunningTotal" SortExpression="RunningTotal" HeaderText="Running Total" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n2}"></asp:BoundField>
<asp:TemplateField HeaderText="VoucherID" SortExpression="VoucherID">
<ItemTemplate>
<asp:LinkButton ID="lblVoucherID" runat="server" CommandName="Select"
CommandArgument='<%#Eval("VoucherID").ToString %>' OnClick="lnkEditLoan_Click"
Text='<%# Bind("VoucherID")%>' ItemStyle-HorizontalAlign="Right" >
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkDeleteFee" runat="server" CssClass="gridbuttonblue" CommandArgument='<%#Eval("MemberFeeID")%>' OnClick="lnkDeleteFee_Click">
<i class="icon-pencil icon-white"></i>Delete
</asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
<EditRowStyle BackColor="#2461BF" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
</asp:GridView>
</div>
</div>
<%--<p>Some text in the modal.</p>--%>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-flat toolbtn" data-dismiss="modal">Close</button>
<asp:LinkButton ID="lnkSearchProduct1" runat="server" CssClass="btn btn-default btn-flat toolbtn" Text="Search Product"></asp:LinkButton>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
Protected Sub lnkSearch_Click(ByVal sender As Object, ByVal e As EventArgs)
If txtmemberid.Text = "" Then
LoadFeeDetail(txtmemberid.Text)
End If
End Sub
Private Sub LoadFeeDetail(ByVal ID As String)
Dim objFeeDetail As New clsmemberContribution
Dim dsFeeDetail As New DataSet
objFeeDetail.MemberID = ID
objFeeDetail.CompanyID = Session("CompanyID")
If objFeeDetail.LoadMemberFeeDetail(dsFeeDetail) = False Then
lblMessage.Text = "<div class=""alert alert-error"">" & objFeeDetail.ErrMessage & "</div>"
gvPaymentHistory.DataSource = Nothing
gvPaymentHistory.DataBind()
Exit Sub
End If
If dsFeeDetail.Tables(0).Rows.Count = 0 Then
'lblMessage.Text = "<div class=""alert alert-info"">No Data</div>"
gvPaymentHistory.DataSource = Nothing
gvPaymentHistory.DataBind()
End If
gvPaymentHistory.DataSource = dsFeeDetail.Tables(0).DefaultView
gvPaymentHistory.DataBind()
If gvPaymentHistory.Rows.Count > 0 Then
gvPaymentHistory.HeaderRow.TableSection = TableRowSection.TableHeader
End If
End Sub