|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Opening new browser from .NETHello I am new to VS2003 .NET development and therefore have a really simple
question: How do you open a new browser from within the code (I am using VB)? I know you can use Respose.Redirect command to go to a different form in the same browser. ALso if the application tries to open a new browser will it be blocked by popup blockers? Thanks, Ashhad. Hello Ashhad,
Use Response.Write() with JavaScript openning new window AS> Hello I am new to VS2003 .NET development and therefore have a AS> really simple question: AS> AS> How do you open a new browser from within the code (I am using VB)? AS> AS> I know you can use Respose.Redirect command to go to a different AS> form in the same browser. AS> AS> ALso if the application tries to open a new browser will it be AS> blocked by popup blockers? --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche You can't do this "directly" because the code you write with .NET runs on a
web server, but only a browser can open another browser and the browser runs on the client. So, what you have to do is pass client-side code from the server to the client (where it will then execute). The simplest way is to send this: Response.Write("<SCRIPT Language='JavaScript'>window.Open('targetURL')</SCRIPT>") As for popup blockers, they should not block this because popup blockers usually open popups that come from ad servers (different domains than the one the user is currently recieving data from) and your popup would be coming from the same domain. -Scott Show quote "Ashhad Syed" <AshhadS***@discussions.microsoft.com> wrote in message news:ADFC6007-E4E0-4EBD-B43C-960A2A866A0F@microsoft.com... > Hello I am new to VS2003 .NET development and therefore have a really > simple > question: > > How do you open a new browser from within the code (I am using VB)? > > I know you can use Respose.Redirect command to go to a different form in > the > same browser. > > ALso if the application tries to open a new browser will it be blocked by > popup blockers? > > Thanks, > Ashhad. |
|||||||||||||||||||||||