Home All Groups Group Topic Archive Search About
Author
8 Jun 2006 4:05 AM
Bonzol
Vb.Net 2003, 1.1. Web application.

Hey there

I have this,

Response.Redirect("FileFiew.aspx")

to go to a new page, but how do I open that page in a new window? So I
will have 2 pages open,, the original page, and the page I opened.

thanx in advance

Author
8 Jun 2006 4:59 AM
Cor Ligthert [MVP]
Bonzol,

Although it is probably possible, will that give you for sure problems,
ASPNET is based on a chain of pages. You sent and you get pages posted back.
With opening a second page and getting that back you will become for sure in
trouble.

Such a second page is mostly called a PopUp by the way.

Cor

Show quoteHide quote
"Bonzol" <Bon***@hotmail.com> schreef in bericht
news:1149739509.624557.186440@c74g2000cwc.googlegroups.com...
> Vb.Net 2003, 1.1. Web application.
>
> Hey there
>
> I have this,
>
> Response.Redirect("FileFiew.aspx")
>
> to go to a new page, but how do I open that page in a new window? So I
> will have 2 pages open,, the original page, and the page I opened.
>
> thanx in advance
>
Author
8 Jun 2006 12:26 PM
Maate
Actually, I don't know if it's possible to open a new window with
vb.net - so I guess you'll have to use JavaScript or so. I've written
two examples below. Possibly it's example 2 you need?

- Maate



' Two examples on how to open a window with JavaScript in .NET
'(replace the about:blank with the url)

    sub page_load

' 1: Creates a link on the fly with the text 'new window' :
      Response.Write("<br><a
onclick=""window.open('about:blank','window2','width=400,height=200');""
href=""#"">new window</a>")

' 2: Opens a window each time you run the line of code:
      Response.Write("<script
language=""JavaScript"">window.open('about:blank');</s" & "cript>")

    end sub




Cor Ligthert [MVP] skrev:

Show quoteHide quote
> Bonzol,
>
> Although it is probably possible, will that give you for sure problems,
> ASPNET is based on a chain of pages. You sent and you get pages posted back.
> With opening a second page and getting that back you will become for sure in
> trouble.
>
> Such a second page is mostly called a PopUp by the way.
>
> Cor
>
> "Bonzol" <Bon***@hotmail.com> schreef in bericht
> news:1149739509.624557.186440@c74g2000cwc.googlegroups.com...
> > Vb.Net 2003, 1.1. Web application.
> >
> > Hey there
> >
> > I have this,
> >
> > Response.Redirect("FileFiew.aspx")
> >
> > to go to a new page, but how do I open that page in a new window? So I
> > will have 2 pages open,, the original page, and the page I opened.
> >
> > thanx in advance
> >
Author
8 Jun 2006 1:24 PM
Herfried K. Wagner [MVP]
"Bonzol" <Bon***@hotmail.com> schrieb:
> Vb.Net 2003, 1.1. Web application.
>
> Hey there
>
> I have this,
>
> Response.Redirect("FileFiew.aspx")
>
> to go to a new page, but how do I open that page in a new window? So I
> will have 2 pages open,, the original page, and the page I opened.

You will have to use client-side JavaScript/JScript/VBScript to open a new
window.  You can use 'window.open' for this purpose:

'open' Method
<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp>

Note that opening windows can lead to problems because of popup blockers and
thus opening a new window will require additional interaction by the user to
make the window appear.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>