Reloading popup in asp.net

I have a popup in ASP.NET

In this popup, I have two divs.

  1. In div one, the child page is loaded.
  2. In div two, the grid view is loaded from one page.

In Div One, I have a save button, clicking on which I need to update the grid in div two from the code of the parent page for reference:

For div:

<div> <input type="button" id="btnSave" value="Save" onclick="someevent" class="btn btn-primary btn-sm" /> </div> 

For div two:

 <div class="modal fade" id="transactionFieldMapping" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width: 100%; height: 100%;"> <div class="modal-dialog" style="width: 68%; height: 75%;"> <div class="modal-content" style="width: 60%; height: 95%;"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="H1"> <asp:Label runat="server" ID="Label2" Text="">Data Dependency Mapping AT TestCase level</asp:Label></h4> </div> <div class="modal-body" style="width: 98%; height: 90%;"> <table width="100%" border="0"> </table> <iframe width="100%" height="100%" id="IframetransactionFieldMapping" frameborder="0" runat="server"> </iframe> </div> </div> </div> </div> 

Div ONE code will be uploaded to I frame available in TWO Div

Now by pressing the save button in DIV ONE I need to update the grid view in div 2 in the same popup.

I just want to just postback from the child page, which is loaded into the I-frame inside the model, but the modal remains open.

+5
source share
1 answer

The Ajax Control Toolkit is perfect for you.

https://www.devexpress.com/Products/AJAX-Control-Toolkit

In terms of what you need is a ModalPopupExtender tool.

Take the time to understand how they work and how to use them. There are tons of videos and forum posts about these tools, and I learned how to use them.

Here's a tip for what you need in particular - asp: UpdatePanel

Good luck

0
source

Source: https://habr.com/ru/post/1247405/


All Articles