AJAX :: How To Close Modalpopup And Refresh Parent Page

Mar 8, 2011

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.


Javascript - Refresh Parent Page After Greybox Close?

Dec 24, 2010

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, "DataItem.id") %>' 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 :)

View 1 Replies View Related

AJAX :: Hidescrollbars In Modalpopup Parent Page?

Mar 4, 2011

i have a modal popup n my asp.net 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).

View 1 Replies View Related

Refresh Parent Window When Close Popup?

Feb 13, 2009

I build a custom .NET app which is being call as pop up window by salesforce.com button. When user close this pop up window, I would like to refresh the parent page which in this case an external website [URL]. How can we do that?

View 5 Replies View Related

AJAX :: Assign A Textbox In The Parent Page From A ModalPopup?

Feb 18, 2011

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


View 1 Replies View Related

AJAX :: Modalpopup Control - Refresh The Page Modal Doesn't Show?

Nov 23, 2010

my problem is related with modalpopup control. i made a login control using 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.

View 1 Replies View Related

AJAX :: How To Refresh Parent Page Details By Keeping Child Window Open

Apr 28, 2010

I have a screen where on filter icon click 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 popup should stay and should not be closed. How do i do this?

The main screen has details like below

Data1 Column2Data Column3Data
Data2 123Data Column3Data
Data2 Column2Data Column3Data
Data3 Column2Data 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?


View 4 Replies View Related

AJAX :: Modalpopup As Usercontrol - Cannot Close Popup

Dec 9, 2010

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.

View 4 Replies View Related

AJAX :: How To Show ModalPopup On Browser Close

Aug 17, 2010

I want to show a ModalPopup (with some data from Database) if user closes current bowser window or tab.

View 3 Replies View Related

AJAX :: Close ModalPopup On Background Click?

Jan 8, 2009

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?

View 3 Replies View Related

Forms Data Controls :: Easily Close Javascript Child Window And Refresh Parent Window?

Aug 29, 2007

I am trying to write some code in 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]....

View 18 Replies View Related

Web Forms :: Refresh Parent Window On Close Of Chlie Window

May 14, 2010

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.

View 2 Replies View Related

AJAX :: How To Close User Control Inside The ModalPopUp Extender

Dec 9, 2009

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) then all the values that is base on the querry will be posted in the page

View 5 Replies View Related

How To Assign A Textbox In The Parent Page From A ModalPopup

Feb 18, 2011

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



View 1 Replies View Related

AJAX :: Moving ModalPopup Extender From Iframe To It's Parent Window

Mar 20, 2010

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.

View 3 Replies View Related

Web Forms :: Modalpopup Display Again When Refresh The Page?

Nov 7, 2009

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.

View 3 Replies View Related

Web Forms :: How To Close Child And Parent Page And Redirect To New Page

Oct 27, 2010

Following is my requirement :

I have 3 asp.net 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) and checking 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.

View 9 Replies View Related

AJAX :: How To Add Close And Refresh Buttons To Dynamic Tab

Jan 20, 2011

I have dynamic ajax tab. I need to add refresh and close button in each tab panel.

here is my code:


View 11 Replies View Related

AJAX :: Refresh Gridview Of Different Data Source After Insert Via Modalpopup?

Nov 21, 2009

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:


View 1 Replies View Related

Handling Browser Close Event And Page Refresh

Nov 16, 2010

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.

View 1 Replies View Related

MVC :: Partial Views And Popups...After Clicking On Close Need To Refresh The Page?

Aug 16, 2010


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

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

View 2 Replies View Related

Refresh The Parent Page?

Dec 30, 2008

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 this.here 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);

View 6 Replies View Related

AJAX :: Like To Close The ModalPopup By Click On The Area Surround Area Of The Pop Up Panel?

Feb 23, 2010

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

View 7 Replies View Related

AJAX :: Hide The Close "X" Button In Modalpopup Window?

Apr 5, 2010

I need to hide the Close "X" button in Modalpopup window. Can it be done?

View 4 Replies View Related

Refresh Parent Control On The Page?

Oct 27, 2009

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..?

View 7 Replies View Related

Web Forms :: Refresh Part Of A Parent Page On Event Fired From An Iframe Page?

Jul 21, 2009

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 of datagrid 1.

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

How can I go about to achieve this...

View 2 Replies View Related

Target The Code-behind On A Parent Page From Within An IFrame Without A Page Refresh?

Nov 1, 2007

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.

View 2 Replies View Related

Web Forms :: How To Refresh Parent Page From Modal

Aug 30, 2010

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.

View 2 Replies View Related

Can Refresh A Parent Page By His Inside Iframe

Oct 15, 2008

can I refresh a parent page by his inside iframe?

View 6 Replies View Related

Parent Page Of ShowModalDialogue Does Not Refresh After It Is Closed?

Jun 5, 2009

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 "Are yo 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.

View 1 Replies View Related

Web Forms :: How To Refresh A Parent Page From A Modal Popup

May 25, 2009

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 Asp.net 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.

View 3 Replies View Related

C# - How To Refresh A Parent Page When Child Window Is Closed

Feb 21, 2011

how to refresh a parent page when child window is closed.

View 2 Replies View Related

AJAX :: Nested Updatepanels Child Refresh With Custom Event From Parent

Dec 26, 2009

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.

View 4 Replies View Related

VS 02/03 Using Window.opener.location.reload(); In IE7 To Refresh Parent Page?

May 16, 2010

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.

View 15 Replies View Related

Refresh Parent Page Using JavaScript In Mozilla Firefox Browser

Apr 3, 2011

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?

Apr 28, 2010

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.

View 1 Replies View Related

Web Forms :: Parent-child Web Form: How To Close Dialog Box And Return Values To Parent Form?

Jan 24, 2010

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.

View 6 Replies View Related

Web Forms :: How To Process And Require To Refresh The Parent Page In One Button Click In Iframe

Nov 14, 2009

i have page,in which i'm having a iframe which calls some page.it gets loaded correctly.in i frame i have 2 textbox and one button click i do some processing and after that i require to refresh the parent page.is it possible?

View 8 Replies View Related

Web Forms :: Close Popup Window And Open Page In Parent Window?

Mar 10, 2011

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.

View 1 Replies View Related

Forms Data Controls :: How To Refresh DataList Control On Parent Page After Data Submission From The Iframe Page

Jan 11, 2010

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;


View 1 Replies View Related

Copyrights 2005-15 www.BigResource.com, All rights reserved