Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to open a new browser window in ASP.net?

Reply
Thread Tools

How to open a new browser window in ASP.net?

 
 
Miguel Dias Moura
Guest
Posts: n/a
 
      04-06-2004
Hello,

i have an ASP.net page with a button. When the button is clicked i want to
open a new Browser window (400x200px) having only the title bar and nothing
else.This browser window would load newpage.aspx in it.

I would also like to know how to create a button to insert in newpage.aspx
and that would close that same window.

I have no idea of how to do this and until now i didn't find some
information that might help me out.

I am working in ASP.net / VB

Thank You,
Miguel


 
Reply With Quote
 
 
 
 
John Timney \(Microsoft MVP\)
Guest
Posts: n/a
 
      04-06-2004
This might get you started

<html>
<head>
<script language="VB" runat="server">

Sub Page_Load( sender as Object,e as EventArgs)

'Form the script that is to be registered at client side.
Dim scriptString as String = "<script language=JavaScript> function
DoClick() {"
ScriptString +=
"window.open('http://www.mvps.org','MyWindow','width=400,height=200');} <"
scriptString += "/"
scriptString += "script>"

If(Not IsClientScriptBlockRegistered("clientScript"))
RegisterClientScriptBlock("clientScript", scriptString)
End If
End Sub
</script>
</head>
<body topmargin="20" leftmargin="10">
<form id="myForm" runat="server">

<INPUT id="launchButton" onclick="DoClick();" type="button"
value="Submit" name="myButton" runat="server">


</form>
</body>
</html>

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP


"Miguel Dias Moura" <(E-Mail Removed)> wrote in message
news:uqw#(E-Mail Removed)...
> Hello,
>
> i have an ASP.net page with a button. When the button is clicked i want to
> open a new Browser window (400x200px) having only the title bar and

nothing
> else.This browser window would load newpage.aspx in it.
>
> I would also like to know how to create a button to insert in newpage.aspx
> and that would close that same window.
>
> I have no idea of how to do this and until now i didn't find some
> information that might help me out.
>
> I am working in ASP.net / VB
>
> Thank You,
> Miguel
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use an asp:button to create a new browser window and output contents to new window =?Utf-8?B?Tm92aWNl?= ASP .Net 2 06-09-2004 10:54 PM
How do I open a new normal (full sized) browser window form a small "pop-up" window? Shiperton Henethe HTML 17 05-21-2004 07:36 AM
window.open() doesn't open new Window in Opera PC HUA Javascript 2 05-19-2004 02:29 AM
Need to open a new browser window, not a new window Gordon ASP General 3 04-16-2004 10:46 PM
Session problem with new IE browser window from window.open() raj Javascript 0 04-07-2004 09:08 PM



Advertisments