Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Opening a Page in a New browser

Reply
Thread Tools

Opening a Page in a New browser

 
 
Sumaira Ahmad
Guest
Posts: n/a
 
      11-04-2004
Hi,

I would like to know if this is possible and how?? Please help..
I have an ASP.NET Web application..
In an aspx page within the application I have a hyperlink whose
NavigateUrl property is set to some other aspx page such as
NewPage.aspx.. When i click on that hyperlink it takes me to the
NewPage.aspx on the same browser. However is it possible to open that
new page in a new browser instead of the same one??

For instance I was following the DIME attachment example from
http://aspnet.4guysfromrolla.com/articles/090804-1.aspx by Scott
Mitchell

and was curious to know if

Hyperlink.NavigateUrl =
"http://localhost/DIMEExampleCSharp/LatestPDF.pdf";
will open up a new browser and show the PDF file in the new browser.

This obviously is a very generic question and would hence apply to any
ASP Web application.

Please, any help will be highly appreciated.

Thanks,
Sumaira
 
Reply With Quote
 
 
 
 
Brian Hoops
Guest
Posts: n/a
 
      11-04-2004
Perhaps I'm misreading this question, but wouldn't
hyperlink.target="_new"
do the trick?


"Sumaira Ahmad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi,
>
> I would like to know if this is possible and how?? Please help..
> I have an ASP.NET Web application..
> In an aspx page within the application I have a hyperlink whose
> NavigateUrl property is set to some other aspx page such as
> NewPage.aspx.. When i click on that hyperlink it takes me to the
> NewPage.aspx on the same browser. However is it possible to open that
> new page in a new browser instead of the same one??
>
> For instance I was following the DIME attachment example from
> http://aspnet.4guysfromrolla.com/articles/090804-1.aspx by Scott
> Mitchell
>
> and was curious to know if
>
> Hyperlink.NavigateUrl =
> "http://localhost/DIMEExampleCSharp/LatestPDF.pdf";
> will open up a new browser and show the PDF file in the new browser.
>
> This obviously is a very generic question and would hence apply to any
> ASP Web application.
>
> Please, any help will be highly appreciated.
>
> Thanks,
> Sumaira



 
Reply With Quote
 
 
 
 
Chris Gastin
Guest
Posts: n/a
 
      11-07-2004
I would use Target="_blank"

<asp:HyperLink id="HyperLink1" Target="_blank"
NavigateUrl="newpage.aspx" runat="server">HyperLink</asp:HyperLink>

or javascript window.open('newpage.aspx')"

<asp:HyperLink id="HyperLink1"
NavigateUrl="javascript:window.open('newpage.aspx' )"
runat="server">HyperLink</asp:HyperLink>

Hope this helps

"Brian Hoops" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Perhaps I'm misreading this question, but wouldn't
> hyperlink.target="_new"
> do the trick?
>
>
> "Sumaira Ahmad" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > Hi,
> >
> > I would like to know if this is possible and how?? Please help..
> > I have an ASP.NET Web application..
> > In an aspx page within the application I have a hyperlink whose
> > NavigateUrl property is set to some other aspx page such as
> > NewPage.aspx.. When i click on that hyperlink it takes me to the
> > NewPage.aspx on the same browser. However is it possible to open that
> > new page in a new browser instead of the same one??
> >
> > For instance I was following the DIME attachment example from
> > http://aspnet.4guysfromrolla.com/articles/090804-1.aspx by Scott
> > Mitchell
> >
> > and was curious to know if
> >
> > Hyperlink.NavigateUrl =
> > "http://localhost/DIMEExampleCSharp/LatestPDF.pdf";
> > will open up a new browser and show the PDF file in the new browser.
> >
> > This obviously is a very generic question and would hence apply to any
> > ASP Web application.
> >
> > Please, any help will be highly appreciated.
> >
> > Thanks,
> > Sumaira

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a page in a separate browser Uriah Piddle ASP .Net 4 11-10-2006 02:43 AM
Anyone resolved links opening blank page? or box opening in Outlook 2000? S.Rodgers Firefox 13 12-16-2005 03:07 PM
Opening a new page (i.e., spawning new IE window) via JavaScript kills the Session variable? POL8985 ASP .Net 1 01-31-2005 04:05 PM
Opening a Page in a New browser Sumaira Ahmad ASP .Net 1 11-04-2004 09:25 PM
Opening a Page in a New browser Sumaira Ahmad ASP .Net Building Controls 0 11-04-2004 08:30 PM



Advertisments