Server side Window.open?

  • Thread starter Thread starter Robin Day
  • Start date Start date
R

Robin Day

Ok, this has to be either easy, or impossible...

I'd like to fire of a pop up window using serverside code...

Basically its a preview popup of a form.
The aspx pop up page goes through the session etc to display the information
entered so far.
Just a javascipt href will not work as when the preview button or link is
pressed the form needs to post back to the server to make the session
information up to date.
Once the processing has been done, I can fire the pop up.

Is there a way of doing this using the Request, Response or Page objects?
Currently the only way I can think of doing it is to output javascipt to the
page as it loads and that calls the window.open.
I personally think that is quite messy and don't like javascipt that
executes on the page loading. I would rather have a neater way of doing it
if anyone knows of one?

Any help much appreciated.
Thanks,
Robin
 
Create your script to open the window, and use Page.RegisterStartupScript()
to add the script to the page, to be run when the page loads in the browser.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.
 
Back
Top