web page opened as dialog does not fire page load event

I use the following code to open a web page  as a dialog form

Me.btnAddInstruction.Attributes.Add("onclick", "var strReturn; strReturn = window.showModalDialog('AddInstruction.aspx',null,'toolbar:no;menubar:no;status:no;dialogWidth:350px;dialogHeight:350px;dialogHide:true;help:no;scroll:no');")

The web page which is being opened has a page load event which populates combo boxes on the web page. However this page load event doesn't fire when the page is opened as a dialog but instead when the page is closed. Now I have a feeling its because the javascript used to open the web page as a dialog is stopping the page load code from executing hence the code continuing when the window is closed. Therefore has anyone any suggestions as to how to open a web page as a dialog but also to make its page_load event fire.

p.s. I'm using ASP.NET 2.0 and Visual Basic

Hope you can help
6/20/2006 1:09:41 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 37
Get it on Google Play
Get it on Apple App Store


Similar Artilces:

how to open a web page in form of a popup web page
Hello, I have two web pages, let say. Page A : With a Button on it. PAge B: with some info. Now I need to: When I click on the Button of page A.Page B must open in a pop up window.  I can do this but problem is this when I clicked on the button for first time it does not show me any thing and when I clicked on the button for second time then It shows me Page B .My code is as follow:  1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!this.Page.IsPostBack) 4 { 5 6 } 7 else 8...

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: http://msdn2.microsoft.com/en-us/library/ms178139.aspxAlso: http://msdn2.microsoft.com/en-us/library/ms178140.aspx might ...

Web page opens second web page, how does first page know when the second one closes?
I have an app written in ASP.NET where one of the web pages opens up a web page in a second window.  When this second web page closes, the first web page needs to update its data.  How do you do this? You can have the child window call a parent method when the user clicks a link to close it. Otherwise, you'd have to set up polling to check for the existence of the child, and refresh if it doesn't exist. Please Mark As Answer posts that helped you."If we learn from our mistakes, I should be brilliant by now." Thanks, this gives me part of the answer...

Web page .aspx is slow when loading. Pages have web user controls on them that are loaded dynamically
I have written a web application using VS 2003. Several of my forms have web user controls on them. The controls are loaded dynamically at runtime. The problem is that the web pages are very slow to load. Does anyone know if there is a way to speed up the pages being loaded into the browser? Here is an example of some code I use to dynamically load the controls:  private void Page_Load(object sender, System.EventArgs e)  {   // Put user code to initialize the page here   // Put user code to initialize the page here    Co...

How to open another web page from one web page
Hi, I am writing an asp.net(C#) 2.0 web page with a link to another web page by clicking a button control on the page, so how can I link it in the codes? I cannot access another aspx page class within the current aspx page class.  Thanks If you need to re-direct the user to another page after pressing your Button, then use the Response.Write method like so: Response.Redirect("~/Default.aspx")Thanks, EdMicrosoft MVP - ASP/ASP.NET 1) Response.Redirect( "Destination PageName");2) Response.Transfer("Destination PageName");3) Hyperlink(  set Url="...

Open web page in IE and populate fields on the form from my web form
To the dot net Knights.  Many humble thanks in advance from a dot net surf. We have an vb application that opens multiple instances of IE object, each to different web pages.  It then takes information from the current record in the app, populates fields on each of the web pages, and them submits the forms.  We are then able to look at the resulting web pages and quickly get the info we're looking for.This prevents us from having to manually navigate to each web site, enter the same information and then wait for the page to open.  If there is ...

How to fire events in other web form from other web form ?
Suppose that I have A and B web form. I want to trigger B web form's Page_Load event from A web form. How can I do that ? Thanks in advanced WilbertWilbert Bujn Create a public method in B that call the load method : public void Load(object sender, System.EventArgs e) { Page_Load(sender, e) ; } In the page_load of A, instanciate a B object and then call the function B myB = new B() ; myB.Load() ; Quicky Thank you quicky, it works fine. WilbertWilbert Bujn...

Master Page's Page Load firing twice on events called from other Page events
I have numerous pages tied to my MasterPage that controls 2 Always visible extenders for User Reminders and a Counter. I would like them to only fire on a Page_Load once, not twice. I have read a million posts about AutoEventWireupset to false, but on all my pages it is set to true and on those pages the events only fire once. The Master page is giving me problems on events firing twice. Any suggestions? here is some code... protected void Page_Load(object sender, EventArgs e) {if (!Page.Master.IsPostBack) {  I call 2 stored procedures here that should only fire once on a Page_Lo...

Debugging exception when loading a web page in the Web Forms Designer
In a project at work I have inherited, I am getting an exception when loading an .aspx page in the Web Forms designer. The project was originally created with VS .NET 2002 and I am upgrading it to VS .NET 2003. It appears that the Web Forms designer actually attempts to instantiating an instance of the codebehind class in order to bring ou the Web Forms designer page. Why does it do this ?The codebehind class inherits from another class, which inherits from System.Web.UI.Page. It is in this other class in which the exception is occurring.Is there any way I can debug this so that I can find o...

link a web page to another web page?
I have a web page with my banner and buttons for my site on it. I want to add this to all of my pages. Instead of copying a pasting that to every page. Is there a way i can link the pages to the banner page? Thanx use ascx?:) Or you could create a template page. That is: Create a page inherited from System.Web.UI.Page and place your banner and buttons in this and then have all your other pages inherit tis custom page instead of System.Web.UI.Page. ...

parent web page --child web page
Dear Developers , how to get values child web page values to parent web page ? For the example , I have parent Employee Address. and child Page have employee personal address.. when i access the Parent page , there is no employee address means ..child page pop rises , after complete child page then only , i can access the parent page.. how to i do .. Thanking u raja Thanks,Regards,Rajamsrasa@yahoo.com...

Could PB .NET Web Form POST security Information to others web page??
This is a multi-part message in MIME format. ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi,=20 Have anyone came across the requesion to POST security informations from = PB .NET web form web page to other web site?? I have tried many datys, Could any kind man give me some suggessions?? thanks & Best regards Leon ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML P...

i web page referencing another web page
Can one web page reference a control on another web page? EX. a page is brought up with a number of textbox controls. Using a hyperlink one can pop up a nother page with the calendar control. Select a date from the calendar control and place the value back in the previous page. Can this be done and how? Use a Page.RegisterClientScriptBlock to open a window, with a javascript string like this: "<script language=Javascript>window.open('my_url.aspx','window_name','left=100,top=100,width=200,height=500,toolbar=no,scrollbars=yes,resizable=yes');</script>" Then you can s...

how to navigate the url page in one web application page to another web application page
In my project one solution have 2 web apllications in one folder.like 1.webapplication1 2.webapplication2. in firt webapplication1 i created one aspx page like sample.axpx. in second webapplication2 i created one aspx page like sample2.aspx... in sample2.aspx page have hyperlinl. I need to navigate this hyperlink when i click it go to the sample.axpx. how can i write navigate url for this...help me. ..thanks  As i understand u, you need Multi Project soltuionsee this link, http://community.rainbowportal.net/blogs/jonathans_rainbow_blog/archive/2006/02/19...

Web resources about - web page opened as dialog does not fire page load event - asp.net.web-forms

List of Las Vegas casinos that never opened - Wikipedia, the free encyclopedia
Steve Wynn, who had purchased and demolished the Dunes, had originally planned to build a modern hotel in the middle of a man-made lake. He later ...

Facebook Pages Can Now Be Opened in Facebook’s iOS Apps Via fb://page URL Scheme Links
... that uses the fb://page URL scheme and have the official Facebook for iPhone/iPad app installed, the corresponding Facebook Page will be opened ...

Arduino Serial Kit opened
Get ready to solder!

Alpha Starter MTG 5000 Sub OPENED Common Giveaway! Openboosters - YouTube
Alpha Starter MTG Magic the Gathering Opened for 5000 subs Giveaway, You can pick a common make a comment, I will do a randomization and pick ...

The UAE's first plastic surgery consultancy has opened up in Dubai - The National
Considering plastic surgery? A new consultancy in Dubai is offering prospective patients objective information, and helps them choose the right ...

ASIO Headquarters in Canberra opened by Kevin Rudd
Prime Minister Kevin Rudd has opened the massive new headquarters of domestic spy agency ASIO.

This Huge Crack That Opened Up In North Mexico Has Fueled Fears Of A Major Quake To Come
Spectacular footage has emerged of a giant crack that opened up across farmland in North Mexico, severing a highway.

New ASIO headquarters opened in Canberra by PM Kevin Rudd
The new building for the Australian Security Intelligence Organisation in Canberra was officially opened on July 23, and named the Ben Chifley ...

Australian soldiers kill Afghan soldier who opened fire in Kabul
TWO AUSTRALIAN soldiers had a lucky escape from death or serious injury after an Afghan soldier opened fire on a New Zealand trainer, sources ...

Samsung Galaxy S6 Edge+ starts to act up with 9 apps opened in background, as seen in YouTube review
Samsung Galaxy S6 Edge+ automatically closes apps in the background, reports claim.

Resources last updated: 1/8/2016 11:04:49 AM