I have a pop up window in ASP.NET
In this pop Up window I have two div.
In div One I have the save button, clicking which I need to update the gridview in the div two from parent page code for reference:
For div one:
<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">×</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 loaded in the I-Frame available in the Div TWO
Now on click of save in DIV ONE i need to update the grid-view in div 2 on the same pop up.
Simply i want just a post-back from the child page which is being loaded in the I-frame inside the model but keeping the modal open.
The Ajax Control Toolkit is perfect for what you're after.
https://www.devexpress.com/Products/AJAX-Control-Toolkit
In terms of what you're after is the ModalPopupExtender tool.
Take your time in understanding how they work and how to use them. There are tonnes of videos and forum posts on these tools and it's the way I've learnt how to use them.
Here's a tip for what you're after in particular - asp:UpdatePanel
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With