Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Popup window in ASP.NET
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00869618
Message ID:
00869659
Views:
12
This is an interesting idea - to fire some script code into the newly generated page. I suspect this generates Invalid HTML though as the script code will end up at the top of the document. Really you should use this.RegisterStartupScript() to make this work correctly.

Also I don't htink it addresses the scenario here. This code will cause a window to pop up when the page is submitted. This may or may not be what you want, as usually you'll want the window to pop up on the CURRENT page. For that you need to use the Onclick attribute.

+++ Rick ---

>Place a button (or any other control that has allows has a click event) on a web form. Double click the the button to open up the click event, and add the following code (of course change to point to the web page you want to display:
>
>
>Response.Write("<script language='javascript'> { javascript:window.open('mywebpage.htm', 'myPopupWindowTitle','resizable=yes,location=no,menubar=yes,toolbar=yes,scrollbars=yes') }</script>")
>
>
>Of course, you may set the window attributes according to your needs.
>
>Regards,
>Carl.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform