Re: forcing a new browser window

From: G Dean Blake (gb_at_nospam.com)
Date: 01/13/05


Date: Wed, 12 Jan 2005 17:01:47 -0800

Well,....
for instance you can set the Target property for any hyperlink to "_blank"
and it will trigger a new browser window when the hyperlink is executed.
Also, in the dataGrid property window you can set "_blank" in the target
dropdown and the same thing happens.

There is certainly no user action in either of these examples.

"Norman Yuan" <NotReal@NotReal.not> wrote in message
news:OWjnYdQ%23EHA.3756@TK2MSFTNGP14.phx.gbl...
> You can only open a new browser window through client end script, server
> code cannot and should not be allowed to do that.. That is, only user's
> action on the client browser can bring up a new browser window. If server
> code could do that, a bad guy would be easily write a simple page a
> attract
> unsuspicious users and then keep popping up thousands of new windows until
> the computer dies.
>
> "G Dean Blake" <gb@nospam.com> wrote in message
> news:ev1c2TQ#EHA.2788@TK2MSFTNGP15.phx.gbl...
>> in my aspx app I am writing a stream that works fine but it replaces what
> is
>> in the client browser window. The code is as follows:
>> .
>> .
>> HttpContext.Current.Response.ClearHeaders()
>> HttpContext.Current.Response.ClearContent()
>> HttpContext.Current.Response.ContentType = "application/pdf"
>> Dim myBuffer(MyStream.Length) As Byte
>> MyStream.Read(myBuffer, 0, CType(MyStream.Length, Integer))
>> HttpContext.Current.Response.BinaryWrite(myBuffer)
>> HttpContext.Current.Response.End()
>>
>> Is there any way I can force this to write to a new browser window?
>> TIA,
>> G
>>
>>
>
>