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.

Parent.aspx

[Code]....

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.

child.aspx

[Code]....

child.aspx.cs

[Code]....

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.



ADVERTISEMENT

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?

Edit

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;

EDIT AGAIN

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

[Code]....

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

[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

[Code]....

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.

[Code]....

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?

[Code]....

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.

protected
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

Code:

[Code]....

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:

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

Markup:

[Code]....

Code Behind:

[Code]....

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

http://forums.asp.net/p/1577242/4029804.aspx#4029804

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







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