Hi Elmo,
welcome to ASPNET newsgroup.
As for the question you mentioned, is the button on your ASP.NET page a
normal html button element or an ASP.NET Button Server Control. For open
a new browser window, generally we can use the jscript function
window.open( ) to open a new page and this is often used for a html button
or link's click event. For example:
<input type="button" value="open new window"
onclick="window.open('
http://www.asp.net')" />
#be care that such opened window maybe blocked by some popup blockers such
as the one in WIN XP SP2.
If the button is a asp.net button Server control, since the button's click
event is a serverside event, we may need to dynamically inject clientside
jscript code in the Button_click server side event. and the
Page.RegisterStartupScript function may help on this. For example:
private void btnServerOpen_Click(object sender, System.EventArgs e)
{
Page.RegisterStartupScript("open_new","<script
language='jscript'>window.open('
http://www.asp.net');</script>");
}
If there're anything unclear or other questions, please feel free to post
here. Hope helps.
Thanks,'
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| NNTP-Posting-Date: Tue, 19 Jul 2005 01:35:44 -0500
| X-Trace-PostClient-IP: 196.14.185.74
| From: "elmo" <
[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: New Browser Window
| Date: Tue, 19 Jul 2005 08:45:04 +0200
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <
[email protected]>
| Lines: 13
| NNTP-Posting-Host: 168.209.98.66
| X-Trace:
sv3-3XskQuB8LEaudaMmnUW8XNsNSISEZI5E6AVLBF0WukGUEC1LnzMm5PlFXRb9EmlBl/bw0WTG
aTpIG+Q!vzNSHT94y+lhwkOFSnHXe0fnecTssGPbEqp6a1FNlTW2WdnROiZqDxiScjxfiyrrutM=
| X-Complaints-To: (e-mail address removed)
| X-DMCA-Complaints-To: (e-mail address removed)
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!ne
wsfeed1.ip.tiscali.net!news.maxwell.syr.edu!newscon02.news.prodigy.com!newsc
on06.news.prodigy.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganew
s.com!local01.nntp.dca.giganews.com!nntp.is.co.za!news.is.co.za.POSTED!not-f
or-mail
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:113013
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| HI,
| This is realy a stupid problem but I cannot find a solution, please help.
| I have a asp.net page that displays after a user has logged on to the
| system. On this page is a couple of options and depending which option, a
| different asp page opens when a BUTTON IS CLICKED. I would like to know
how
| to progrm the button so that a new browser window opens and not close the
| previous one. In the old HTML it was easy, I just used _blank and there
you
| go. I am using VB on my asp page.
|
| Thanks
| Elmo
|
|
|