How to close the popup gridview after textbox bind in asp.net?
As this is my coding
txtval1.Text = GridView1.SelectedRow.Cells[1].Text; txtval2.Text = GridView1.SelectedRow.Cells[12].Text; txtval3.Text = GridView1.SelectedRow.Cells[0].Text;
<div class="modal fade" id="myModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <asp:UpdatePanel ID="upModal" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional" > <ContentTemplate> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title"><asp:Label ID="lblModalTitle" runat="server" Text=""></asp:Label></h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" cellpadding="12" class="table table-bordered table-hover"> <Columns> <asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID" /> <asp:BoundField DataField="Name" HeaderText="Name" /> <asp:BoundField DataField="Last_Name" HeaderText="Last_Name" /> <asp:BoundField DataField="First_Name" HeaderText="First_Name" /> <asp:BoundField DataField="Middle_Name" HeaderText="Middle_Name" /> <asp:CommandField ShowEditButton="True" /> <asp:CommandField ShowSelectButton="True" /> <asp:CommandField ShowDeleteButton="True" /> </Columns> </asp:GridView> </div> <div class="modal-footer"> <button class="btn btn-info" data-dismiss="modal" aria-hidden="true">Close</button> </div> </div> </ContentTemplate> </asp:UpdatePanel> </div> </div>
Hey SUJAYS,
Please share your code and explain in details.
If you want to close popup then you can call the Javascript function to close.
ScriptManager.RegisterStartupScript(this, this.GetType(), "HidePopup", "$('#MyPopup').modal('hide')", true);
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.