In my asp.net application i have used modal pop up using Jquery. Inside pop up window i have asp.net button. In which i need to write server side code for inserting data to database. But when i click on Button modal pop up is getting closed. I want to keep the modal pop up open when click on the button. Below is my html code,
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<div class="row route-for-reg">
<div class="routes-container">
<div class="row padding-tb-10">
<div class="col-md-4 col-lg-3">
<asp:DropDownList ID="dpPickupLocation" CssClass="form-control ng-pristine ng-untouched ng-valid ng-valid-required " data-placeholder="Choose pickup point..." runat="server">
<asp:ListItem>as</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-4 col-lg-3">
<asp:DropDownList ID="dpDropLocation" CssClass="form-control ng-pristine ng-untouched ng-valid ng-valid-required" data-placeholder="Choose Hinjewadi drop point..." runat="server"></asp:DropDownList>
</div>
<div class="col-md-6">
<asp:UpdatePanel ID="modalPanel" runat="server"><ContentTemplate>
<asp:Button ID="btnViewRoutes" runat="server" Text="View All Routes" OnClick="btnViewRoutes_Click" CausesValidation="false" />
</ContentTemplate></asp:UpdatePanel>
</div>
</div>
<div id="accordion-resizer" class="row padding-tb-10">
<div id="accordion">
<h3>Pickup</h3>
<div>
<asp:Label ID="lblHolderPickup" runat="server" Text="There are no routes available"></asp:Label>
<asp:GridView ID="gridPickUp" runat="server" CssClass="routes-list"></asp:GridView>
</div>
<h3>Drop</h3>
<div>
<asp:Label ID="lblHolderDrop" runat="server" Text="There are no routes available"></asp:Label>
<asp:GridView ID="gridDrop" runat="server" CssClass="routes-list"></asp:GridView>
</div>
</div>
</div>
<input class="primary-bt" type="button" value="Click to Proceed " />
</div>
</div>
</div>
</div>
</div>
Is there any way to hold the popup window with out closing it when button is clicked.
Thank you in advance Sangeetha
You can achieve this using following options
UpdatePanel