Is it possible to open a redirect in a new window

Last post 09-02-2008 12:17 AM by janebush08. 4 replies.

Sort Posts:

  • Is it possible to open a redirect in a new window

    09-22-2007, 9:29 AM
    • Contributor
      2,705 point Contributor
    • Jackxxx
    • Member since 04-13-2003, 11:43 AM
    • Northern California
    • Posts 2,049

    Is it possible to open a response.redirect in a new window?

    Protected Sub btnPrintablePage_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrintablePage.Click
            Response.Redirect("../PrintablePages/sqlPrint.aspx?ClientID={0}")
    End Sub

     
     
    Thank you

    Jackxxx
  • Re: Is it possible to open a redirect in a new window

    09-22-2007, 9:33 AM
    Answer
    • All-Star
      96,711 point All-Star
    • mbanavige
    • Member since 11-06-2003, 1:29 PM
    • New England, USA
    • Posts 10,227
    • Moderator
      TrustedFriends-MVPs

    no.

    The redirect is a response that is always sent back from the server to the window making the request.

    opening a new window is something that must be initiated at the client.

     

    Mike Banavige
    ~~~~~~~~~~~~
    Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
  • Re: Is it possible to open a redirect in a new window

    09-22-2007, 9:40 AM
    • Star
      9,042 point Star
    • HosamKamel
    • Member since 01-19-2006, 6:49 PM
    • Egypt
    • Posts 1,308

    Response.Redirect run on the server you have to use client script to open the window

    you can use JavaScript window.Open() 

    window.open('page.html', "_blank");

    or from server side  

    response.write("<script>");
    response.write("window.open('page.html','_blank')");
    response.write("</script>");

    Hosam Kamel

    Remember to click on Mark as answer on the post that helped you
  • Re: Is it possible to open a redirect in a new window

    09-27-2007, 9:11 AM
    • Member
      748 point Member
    • mcp111
    • Member since 12-31-2006, 5:16 AM
    • Posts 240
    Regards

    Partha Mandayam
    Sr Prog Analyst
    Kaiser Permanente

  • Re: Is it possible to open a redirect in a new window

    09-02-2008, 12:17 AM
    • Member
      10 point Member
    • janebush08
    • Member since 09-01-2008, 8:33 AM
    • Posts 5

     Wow thanks Partha... great job Smile

Page 1 of 1 (5 items)