Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reloading a pop up window in asp.net

I have a pop up window in ASP.NET

In this pop Up window I have two div.

  1. In div one a child page is being loaded.
  2. In div two a grid-view is being loaded from the same page.

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">&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 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.

like image 686
SHIVANG RANA Avatar asked Oct 30 '22 05:10

SHIVANG RANA


1 Answers

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!

like image 161
Fandango68 Avatar answered Nov 09 '22 23:11

Fandango68