Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


AJAX :: How To Close Modalpopup And Refresh Parent Page

I've a parent page with a long form. I am opening ajax modal popup extender on the click of a radio button.



In child.aspx, I've another long form. When the submit button is clicked, I am doing some processing, after that need to close the modal popup window and refresh my parent page, without disturbing the values already entered in the parent page.





My questions are

1. How do close the modal popup?

2. How I do refresh the parent.aspx without disturbing existing values? My browser is IE, no firefox since it's in intranet.

View 2 Replies (Posted: Mar 08, 2011 12:38 AM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Javascript - Refresh Parent Page After Greybox Close?
I have a blog, where people can make comments. I've now decided to put the "writecomments.aspx" file in a Greybox popup-window. It works, but I want to close the window from codebehind (or javascript) after the comment is written. And then I want to refresh the blog page (the parent page) to show the new comment.

This is the code that opens the greybox (writecomments.aspx) page:

<a href='WriteComments.aspx?BlogId=<%# DataBinder.Eval(Container, "") %>' rel="gb_page_center[500, 500]">Skriv kommentar</a>

In the writecomments.aspx file, I just have 2 textboxes and 1 button (save-button). How can I make the greybox window close itself, and then somehow refresh the blog.aspx? Or maybe just a specific updatepanel for the current comments?


I got it working, I had to put this code in the codebehind, after the db-insert: Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "parent.parent.GB_hide();", true); And for the refresh of the parent page, I edited the gb_scripts.js file on line 12 from false to true: this.reload_on_close=true;


Actually, I modified it a bit, so, I put the gb_scripts.js file back to it's default state, and I just just the followig line of code in the WriteComments.aspx codebehind file, just after the db-insert:

Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "parent.parent.window.location.reload();parent.parent.GB_hide();", true);

Now, the Greybox is closing, and then, the blog page is refreshing, just like I want :)

Posted: Dec 24 10 at 7:54

View 1 Replies!   View Related
AJAX :: Hidescrollbars In Modalpopup Parent Page?
i have a modal popup n my page.

by clicking on Button i can show the popup and my parent page is disabled (But i am still able to scroll on the parent page. which is not the purpose).

Posted: Mar 04, 2011 09:29 AM

View 1 Replies!   View Related
Refresh Parent Window When Close Popup?
I build a custom .NET app which is being call as pop up window by button. When user close this pop up window, I would like to refresh the parent page whichin this case an external website [URL]. How can we do that?

Posted: Feb 13, 2009 05:30 PM

View 5 Replies!   View Related
AJAX :: Assign A Textbox In The Parent Page From A ModalPopup?
I see a lot of people have been asking this question, some was because of the if postback check , but mine is different. i am using AjaxModalExtender to show my popup on the server side. this is my markup


as you can see i have a gridview that will be on the modal and its working fine, now after the grid has returned some results, i will select one record via the checkbox on the Grid and click the button "btnPickrecord" and this will fire my server side code


the breakpoints got a hit and i stepped through it and i the value get assigned to the textbox <b> txtreference.Text</b> , but when i close the modal the textbox is empty , or while the modal is open i can see the value does not reflect in the parent page. Here is the Code for invoking the modal


Posted: Feb 18, 2011 09:40 AM

View 1 Replies!   View Related
AJAX :: Modalpopup Control - Refresh The Page Modal Doesn't Show?
my problem is related with modalpopup control. i made a login controlusing it.


This works fine. Problem is this. When i click btniptal and then i refresh the page modal shows again. But When i click btngiris and then i refresh the page modal doesn't show. When clicking the btniptal button, the modalpopup should not show.If i make this codes in aspx page everything is ok. But i make this in usercontrol.

Posted: Nov 23, 2010 06:51 PM

View 1 Replies!   View Related
AJAX :: How To Refresh Parent Page Details By Keeping Child Window Open
I have a screen where on filtericonclick on a column i need to show a popup screen or a div looks like popup and in which will have list of check boxes with distinct values of all rows of column one (i.e. the data of popup is like below). All these check boxes are dynamically generated controls.

checkboxcontrol Data1
checkboxcontrol Data2
checkboxcontrol Data3

When user click on any of the above check boxes the parent grid should get refreshed with the filtered data and popup or div tag looks like popupshould stay and should not be closed.How do i do this?

The main screen has details like below

Data1 Column2Data Column3Data
Data2123Data Column3Data
Data2Column2Data Column3Data
Data3Column2Data Column3Data

How to refresh my parent page details by keeping my child div tag open or child window open?What is better approach whether to create server side div tag or a modal popup window?


Posted: Apr 28, 2010 06:18 PM

View 4 Replies!   View Related
AJAX :: Modalpopup As Usercontrol - Cannot Close Popup
My popup is a usercontrol, which as datagrid , OK button and Cancel button. My ModalPopup Extender is in page(Page1.aspx)How do i close the popup without posting back. I cannot use CancelControlID because mymodalpopup extender is in page1.aspx and my Cancel button is in Usercontrol.

Posted: Dec 09, 2010 03:12 PM

View 4 Replies!   View Related
AJAX :: How To Show ModalPopup On Browser Close
I want to show a ModalPopup (with some data from Database) if user closes current bowser window or tab.

Posted: Aug 17, 2010 06:27 AM

View 3 Replies!   View Related
AJAX :: Close ModalPopup On Background Click?
I am trying to figure out how to get the ModalPopup to close if you click anywhere on the page except on the modal itself. I have tried various solutions with calling Hide() and using cancelBubble for the onclick of the panel of the modal and nothing gets it quite right.

Has anyone come across this before or seen a request where you want the Modal to hide even if you don't click on a "close" button?

Posted: Jan 08, 2009 05:23 PM

View 3 Replies!   View Related
Forms Data Controls :: Easily Close Javascript Child Window And Refresh Parent Window?
I am trying to write some codein my c# code behind close a child window and refresh the parent window. Here is what I have right now.

void GridViewInvoiceSearch_SelectedIndexChanged(object sender,
EventArgs e)
{ [code]....

Posted: Aug 29, 2007 08:07 PM

View 18 Replies!   View Related
Web Forms :: Refresh Parent Window On Close Of Chlie Window
I have created an intranet application in ASP. From my main web page I am opening a web browser window and adding a record to database from that new window. Now on close of that window I want to refresh my main web page to reflect the database changes. My backend is "ms access" Also on the other hand I also want to disable the closing button of web browser.

Posted: May 14, 2010 05:13 AM

View 2 Replies!   View Related
AJAX :: How To Close User Control Inside The ModalPopUp Extender
I have a modal popup extender inside it is a user control. My problem is how am I going to close the modal, of course it can't be Modalpopupextender.Hide.

The scenario is after i click an item in grid, the item will be search to the db(of course it need postback) thenall thevaluesthat is base onthe querry will be posted in the page

Posted: Dec 09, 2009 12:56 AM

View 5 Replies!   View Related
How To Assign A Textbox In The Parent Page From A ModalPopup
I see a lot of people have been asking this question, some was because of the if postback check , but mine is different. i am using AjaxModalExtender to show my popup on the server side. this is my markup



Posted: Feb 18th, 2011, 04:39 AM

View 1 Replies!   View Related
AJAX :: Moving ModalPopup Extender From Iframe To It's Parent Window
I have an iframe inside my main page. There is a modalpopup extender inside the iframe page. So when the modalpopup is shown, the parent of the modalpopup is the iframe body and the main page parent body. Thus the overlay only covers the iframe and not the entire page. So I want to open the modalpopup extender in the iframe's Parent window.

Posted: Mar 20, 2010 12:28 PM

View 3 Replies!   View Related
Web Forms :: Modalpopup Display Again When Refresh The Page?
I have a modalpopup on my page where i send email to my user. If i press f5 or refesh the page,

the modalpopup display again and sends the email again, even i clear the textboxes after sending the email.How can i avoid this.

Posted: Nov 07, 2009 05:51 AM

View 3 Replies!   View Related
Web Forms :: How To Close Child And Parent Page And Redirect To New Page
Following is my requirement :

I have 3 web pages. From the 1st page i am opening showmoadlDialog(2nd page) in which(2nd page) i am storing some value in session(Ineed to do this here only) andchecking some count which is coming from database, If count is Zero it will display message but if some value is there and then if i click on Ok button it will redirect to 3rd page. And close the 1st and 2nd Page.

how to do this ?

When i am clicking on Ok button it is showing some cofirmation message(Do you want to close this window) but this i dont want.

Posted: Oct 27, 2010 03:04 PM

View 9 Replies!   View Related
AJAX :: How To Add Close And Refresh Buttons To Dynamic Tab
I have dynamic ajax tab.I need to add refresh and close button in each tab panel.

here is my code:


Posted: Jan 20, 2011 12:37 PM

View 11 Replies!   View Related
AJAX :: Refresh Gridview Of Different Data Source After Insert Via Modalpopup?
I am using hte Ajax modalpopupextender to use a DetailsView with a sqldatasource to insert a new row, then I want to refresh a gridview that uses a different sqldatasource. I cannot get the gridview on the parent page to refresh. It seems as though this is related to the parent page not refreshing upon the modal close?



Code Behind:


Posted: Nov 21, 2009 07:08 PM

View 1 Replies!   View Related
Handling Browser Close Event And Page Refresh
In our application we need to handle browser close event. When a user directly closes the browser, we should give him an alert message and stop him by directly closing the window based on some conditions. This we have handled through body onunload event. The problem is we are getting the alert message but after showing the alert message the window gets closed.

Is there any way to stop closing the window on click of browser close event?

And also when the page is refreshed, the last performed action is getting fired again.

Posted: Nov 16 10 at 13:57

View 1 Replies!   View Related
MVC :: Partial Views And Popups...After Clicking On Close Need To Refresh The Page?

I amusing the PopUp example as suggestedin the above forum link.....

But now i want to Refresh the page after clicking on Close(x) ...

Posted: Aug 16, 2010 01:51 PM

View 2 Replies!   View Related
Refresh The Parent Page?
I wrote the code for show modal dialog in the Button on client click event. When ever i close that window automatically the parent page is refreshing.

but I wrote the code for show modal dialog in button on click event The parent page is not refreshing.

I wrote the the code in button on click event like i create buttons in runtime .How i refresh the parent page?

protected void b1_Click(object sender, EventArgs e)
string scriptKey = "PopupScript";
if (!this.ClientScript.IsStartupScriptRegistered(this.GetType(), scriptKey))
StringBuilder javaScript = new StringBuilder();
javaScript.Append("showModalDialog('colordialog.aspx', self, 'status:no; dialogWidth:300px; dialogHeight:150px; help:no; scroll:no; menubar:no; resizable:no');");
this.ClientScript.RegisterStartupScript(this.GetType(), scriptKey, javaScript.ToString(), true);

Posted: Dec 30, 2008 09:25 AM

View 6 Replies!   View Related
AJAX :: Like To Close The ModalPopup By Click On The Area Surround Area Of The Pop Up Panel?
I used ModalPopup Control on this link, [URL]How should I write the code that to close pop up by click the area outside the pop up panel?I use AjaxControlToolkit-Framework3.5SP1

Posted: Feb 23, 2010 12:10 PM

View 7 Replies!   View Related
AJAX :: Hide The Close "X" Button In Modalpopup Window?
I need to hide the Close "X" button in Modalpopup window. Can it be done?

Posted: Apr 05, 2010 06:22 AM

View 4 Replies!   View Related
Refresh Parent Control On The Page?
in here.. i have a gridvide control which has dropdown in my itemTemplate..

along with that it contains a link in the ItemTemplate..

now the funny thing is...when i click on that link..

a pop comes up with details...

i do edit/ update/ delete..

next i close the popup...and i see my old data in that gridview...

now i wanna do something like when i close my popup..

it will not refresh my parent page...(refreshing the parent page is easy)..

but now i want is it should only refresh my gridview...

so is it possible..?

Posted: Oct 27th, 2009, 11:26 AM

View 7 Replies!   View Related
Web Forms :: Refresh Part Of A Parent Page On Event Fired From An Iframe Page?
I have a page containing a datagrid(datagrid 1) and an iframe.

The page dispalyed in the iframe has a datagrid(datagrid 2) too.

Now on selection of any row in the datagrid 2, i want to update the contents ofdatagrid 1.

I have enclosed datagrid 1 within the update panel since i donot want page reloads.

How canI go about to achieve this...

Posted: Jul 21, 2009 11:58 AM

View 2 Replies!   View Related
Target The Code-behind On A Parent Page From Within An IFrame Without A Page Refresh?
In order to maintain a persistent "shell" with some user controls and overall site navigation I am using an iFrame to display content, while the parent page that contains the "shell" is a simple aspx page. On the parent page, I have an <asp:HyperLink> control that displays the name of the user who is currently logged in and links to their user profile.

However, the login takes place inside the iFrame, and I need to update the user name and link on the shell.aspx page WITHOUT refreshing the page. All of the solutions I have seen involve triggering a page refresh on the parent and adding code to the Page_Load event. Is there a way to target the code-behind on a parent page from within an iFrame? In case it makes a difference, my content pages within the iFrame use a master page, while my shell.aspx page does not.

Posted: Nov 01, 2007 03:40 PM

View 2 Replies!   View Related
Web Forms :: How To Refresh Parent Page From Modal
I would need a code for refreshing parent page from modal, having in mind that modal is a separate page. Note that im using developer express popup for modal.

Posted: Aug 30, 2010 04:48 PM

View 2 Replies!   View Related
Can Refresh A Parent Page By His Inside Iframe
can I refresh a parent page by his inside iframe?

Posted: Oct 15, 2008 04:50 PM

View 6 Replies!   View Related
Parent Page Of ShowModalDialogue Does Not Refresh After It Is Closed?
In an Asp.Net GrdView I have a LinkButton.When it is clicked,a ShowModalDialogue Pop Up Opens up. This PopUp contains some details. I am saving the details and in the save button click , a confirm message box "Areyo sure you want to save" is displayed and when I click on OK of the Confirm Message box, another alert message "saved successfully" is displayed. I am closing the PopUp in the same button click. And it is redirected to the Parent Page. Now again when i manually refresh the parent page and click on the Link Button, the pop up opens but the newly saved data is not displayed. how ever, sometimes i I Debug the solution again, it refreshes.

Posted: Jun 05, 2009 10:52 AM

View 1 Replies!   View Related
Web Forms :: How To Refresh A Parent Page From A Modal Popup
I have a modal popup in which I need to upload a file and store in the database should give a message to the user that file is uploaded and update the parent page when I close the modalpopup..Please suggest me the best way to do this.I am working on 3.5 with C# .net


I am using modal popup extender from AjaxControlKit to open a new modal popup in which targetcontrolid is set to a linkbutton.a pop up should appear when a user clicks on the link button which should show a fileupload control and should upload the image on click of an uopdate button gives a confirmation message to the user that file has uploaded and should refresh the parent page.

Posted: May 25, 2009 12:33 PM

View 3 Replies!   View Related
C# - How To Refresh A Parent Page When Child Window Is Closed
how to refresh a parent page when child window is closed.

Posted: Feb 21 at 11:26

View 2 Replies!   View Related
AJAX :: Nested Updatepanels Child Refresh With Custom Event From Parent
we have an aspx web page which looks like this

<Parent UpdatePanel>
<Parent gridview/>
<Child UpdatePanel>
<Child gridview/>
</Child UpdatePanel>
</Parent UpdatePanel>

here is our scenario;

1. a button on the grid view fill a custom eventarguments and fire it in side the RowCommand on the grid.

2. the usercontrol handels the event and set the child gridview datasource to the event arguments and binds it.

what we are not able to do is to make the child updatepanel update its context which will make the childgrid data visible. ( the custom event is in saparet class) beside we can achieve this senario in other ways but we need the custom event way.

Posted: Dec 26, 2009 02:45 PM

View 4 Replies!   View Related
VS 02/03 Using Window.opener.location.reload(); In IE7 To Refresh Parent Page?
I have a web page that opens another web page in a pop up window. I would like to refresh the parent page when the submit button is clicked on the pop up page. I tried using window.opener.location.reload(); in IE7 but nothing seems to be happening.

Posted: May 16th, 2010, 01:54 PM

View 15 Replies!   View Related
Refresh Parent Page Using JavaScript In Mozilla Firefox Browser
The function window.opener.location.reload(); is working fine with IE but not refreshing parent page in mozilla firefox browser. how to refresh parent page in cross browser/browser independent.

i have got this function:



View 1 Replies!   View Related
Don't Want To Refresh The Parent Page And Popup Page?
i place the login control in updatepanel in that panel.incase of valid user it is ok,in case of invalid user the popupwind is refreshed,i don't want to refresh the parent page and popup page.

Posted: Apr 28, 2010 11:30 AM

View 1 Replies!   View Related
Web Forms :: Parent-child Web Form: How To Close Dialog Box And Return Values To Parent Form?
In my website I have two forms: parent form and child form(dialog box). Their expected behaviour is like this: if clicked on 'show' button on parent form, a dialog form opens that displays a gridview. In dialog form, if clicked on 'select' button it closes
itself and returns value in selected row back to parent form.

To achieve this I write following code (.cs) : in parent form:

void ShowBtn_Click(object sender, EventArgs e)


StringBuilder jScript = new StringBuilder(); [code]....

Now problem is: the code in parent .cs works fine, it opens the dialog properly. But when clicked on 'select', instead of returning back to parent, it opens the same dialog again in new window. This newly open window says "Done but error on page" at left bottom.

Posted: Jan 24, 2010 10:03 PM

View 6 Replies!   View Related
Web Forms :: How To Process And Require To Refresh The Parent Page In One Button Click In Iframe
i have page,in which i'm having a iframe which calls some gets loaded i frame i have 2 textbox and one button click i do some processing and after that i requireto refresh the parent it possible?

Posted: Nov 14, 2009 07:28 AM

View 8 Replies!   View Related
Web Forms :: Close Popup Window And Open Page In Parent Window?
I have a login page that is loaded in popup window (colorbox) and after user logs in it should be closed and parent window should be loaded with new page.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Do While reader.Read()
If Trim(reader("ZAP").ToString()) = Trim(textBoxZap.Text) Then
Session("A") = "1"
lblErr.Text = "incorect"
End If

So once the buton is clicked and user name and password is corect popup window should be closed and user redirected to default aspx.

Posted: Mar 10, 2011 09:08 AM

View 1 Replies!   View Related
Forms Data Controls :: How To Refresh DataList Control On Parent Page After Data Submission From The Iframe Page
How can i refresh(Asych) the contents of my Datalist on the parent page from a data change in a page that is displayed in an iFrame on the parent page.

I have movie names with image in the data list that is on parent page.

there another page is openend in the parent pages in an iFrame control.

in that sub page i upload image and other data related to a new movie.

What i want is that when i submit that information in an iFrame page, the DataList should update(Asych) itself on the parent page showing new updated info.

the structure is like;


Posted: Jan 11, 2010 09:03 AM

View 1 Replies!   View Related
Copyright 2005-08, All rights reserved