Opening New Window through code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to open a new window through code. Can someone provide me with an example or point me to one in the VB.Net language. Thank

Devin
 
You can open a new window using javascript such as this:
a=window.open('MyPage.aspx','MyWindow')
There are all kinds of options for setting window properties such as window
size and toolbar visibility.
Here's more info:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp

You can use the RegisterClientScriptBlock or RegisterStartupScript
functions to help you output the javascript from your server code.
Here's more info on these:
http://msdn.microsoft.com/library/d...UIPageClassRegisterClientScriptBlockTopic.asp
http://msdn.microsoft.com/library/d...mWebUIPageClassRegisterStartupScriptTopic.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


Devin said:
I want to open a new window through code. Can someone provide me with an
example or point me to one in the VB.Net language. Thanks
 
What actual code can I put in the Button_Click event to open another
form in my project? (ASP.NET using VB.NET)
 
Back
Top