Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open a new window from Code Behind
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00717342
Message ID:
00717378
Views:
13
This message has been marked as the solution to the initial question of the thread.
Hi Rodney,

In the click event of your menu add the following:
Dim sUrl As String = "MyHelp.aspx"
Dim sFeatures As String = "'height=320;width=160;left=100;top=50'"

' Create a client script to open the window
Dim sScript As String
sScript &= "<script language=javascript>"
sScript &= "window.open('" & sUrl & "',''," & sFeatures & ");"
sScript &= "</script>"

' Write it into the output stream for immediate execution
Response.Write(sScript)
>Hi,
>
>Can I open a new window from the code behind page. I want to display my HTML help in a new window, and I want to launch it from a click event of my ASP.NET menu. I know I can do it in HTML using a button, but I would rather use the existing menu than have to add an HTML button.
>
>Thanks,
>
>Rodney
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform