Opening a Page in a New browser

Discussion in 'ASP .Net Web Controls' started by Sumaira Ahmad, Nov 4, 2004.

  1. 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
    Sumaira Ahmad, Nov 4, 2004
    #1
    1. Advertising

  2. Sumaira Ahmad

    Brian Hoops Guest

    Perhaps I'm misreading this question, but wouldn't
    hyperlink.target="_new"
    do the trick?


    "Sumaira Ahmad" <> wrote in message
    news:...
    > 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
    Brian Hoops, Nov 4, 2004
    #2
    1. Advertising

  3. Sumaira Ahmad

    Chris Gastin Guest

    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" <> wrote in message news:<>...
    > Perhaps I'm misreading this question, but wouldn't
    > hyperlink.target="_new"
    > do the trick?
    >
    >
    > "Sumaira Ahmad" <> wrote in message
    > news:...
    > > 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
    Chris Gastin, Nov 7, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gabe
    Replies:
    2
    Views:
    7,189
    soumyamathewmca
    Dec 16, 2008
  2. Sumaira Ahmad

    Opening a Page in a New browser

    Sumaira Ahmad, Nov 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    487
    Kevin Spencer
    Nov 4, 2004
  3. =?Utf-8?B?Q3JhaWcgSEI=?=

    opening a new browser

    =?Utf-8?B?Q3JhaWcgSEI=?=, Jan 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    478
    Shiva
    Jan 5, 2005
  4. POL8985
    Replies:
    1
    Views:
    541
    Kevin Spencer
    Jan 31, 2005
  5. Sumaira Ahmad

    Opening a Page in a New browser

    Sumaira Ahmad, Nov 4, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    98
    Sumaira Ahmad
    Nov 4, 2004
Loading...

Share This Page