Re: New browser window

by Mark Rae [MVP] on 11/1/2007 10:46:00 AM "guy" <guy@discussions.microsoft.com> wrote in message
news:A52DA94E-CD6B-48C3-89DF-8741A5EB96B1@microsoft.com...

>I have done this loads of time, but need a reminder - how do i load up a
>new
> browser window from code?
>
> (Brain is fried - i have been doing Winforms!)

JavaScript...

window.open(.........);


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 

Re: New browser window

by Mark Rae [MVP] on 11/1/2007 11:12:00 AM "guy" <guy@discussions.microsoft.com> wrote in message
news:0E92CA97-1039-494D-8786-D99B6C79464A@microsoft.com...

>> "guy" <guy@discussions.microsoft.com> wrote in message
>> news:A52DA94E-CD6B-48C3-89DF-8741A5EB96B1@microsoft.com...
>>
>> >I have done this loads of time, but need a reminder - how do i load up a
>> >new
>> > browser window from code?
>> >
>> > (Brain is fried - i have been doing Winforms!)
>>
>> JavaScript...
>>
>> window.open(.........);

> sorry I did not make myself clear, i mean in VB.NET

You obviously can't open browser windows server-side...

You need to use client-side JavaScript, though you can make your server-side
code send the necessary JavaScript down to the client...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 

Re: New browser window

by John Timney (MVP) on 11/1/2007 11:22:00 AM This I think off the top of my head
Page.ClientScript.RegisterStartupScript(me.GetType(),"open","window.open('http://www.microsoft.com','','height=400,width=300');",true)

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog


"guy" <guy@discussions.microsoft.com> wrote in message
news:A52DA94E-CD6B-48C3-89DF-8741A5EB96B1@microsoft.com...
>I have done this loads of time, but need a reminder - how do i load up a
>new
> browser window from code?
>
> (Brain is fried - i have been doing Winforms!)
>
> Guy


 

Re: New browser window

by Mark Rae [MVP] on 11/1/2007 11:46:00 AM "guy" <guy@discussions.microsoft.com> wrote in message
news:A113811E-9C5A-4DB5-B54F-9E703EFCA679@microsoft.com...

>> >> >I have done this loads of time, but need a reminder - how do i load
>> >> >up a
>> >> >new
>> >> > browser window from code?
>> >> >
>> >> > (Brain is fried - i have been doing Winforms!)
>> >>
>> >> JavaScript...
>> >>
>> >> window.open(.........);
>>
>> > sorry I did not make myself clear, i mean in VB.NET
>>
>> You obviously can't open browser windows server-side...
>>
>> You need to use client-side JavaScript, though you can make your
>> server-side
>> code send the necessary JavaScript down to the client...
>
> Hmm, I have done it before, there is a command that you pass a URL and an
> Enum to which allows you to fire up an new Browser instance, redirect in
> the
> current instance etc...

There is no way to open a client window from the server, other than to make
the server send the necessary JavaScript to the client...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 

Re: New browser window

by Mark Rae [MVP] on 11/1/2007 12:20:00 PM "guy" <guy@discussions.microsoft.com> wrote in message
news:E9B76130-F743-4328-A6C9-0E9F2E1A03CF@microsoft.com...
>> "guy" <guy@discussions.microsoft.com> wrote in message
>> news:A113811E-9C5A-4DB5-B54F-9E703EFCA679@microsoft.com...
>>
>> >> >> >I have done this loads of time, but need a reminder - how do i
>> >> >> >load
>> >> >> >up a
>> >> >> >new
>> >> >> > browser window from code?
>> >> >> >
>> >> >> > (Brain is fried - i have been doing Winforms!)
>> >> >>
>> >> >> JavaScript...
>> >> >>
>> >> >> window.open(.........);
>> >>
>> >> > sorry I did not make myself clear, i mean in VB.NET
>> >>
>> >> You obviously can't open browser windows server-side...
>> >>
>> >> You need to use client-side JavaScript, though you can make your
>> >> server-side
>> >> code send the necessary JavaScript down to the client...
>> >
>> > Hmm, I have done it before, there is a command that you pass a URL and
>> > an
>> > Enum to which allows you to fire up an new Browser instance, redirect
>> > in
>> > the
>> > current instance etc...
>>
>> There is no way to open a client window from the server, other than to
>> make
>> the server send the necessary JavaScript to the client...


> Presumably the command sends the necessary JavaScript :-)

Correct.


--
Mark Rae
ASP.NET MVP
http://www.markrae.net