Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. New window should open in another browser

New window should open in another browser

Scheduled Pinned Locked Moved ASP.NET
collaborationhelptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    siddisagar
    wrote on last edited by
    #1

    Hi Team, I am having problem with window. I am having one path I am taking in String. On button click I am calling Response.Redirect (str) where str=path of the url. I need to open the url in another browser how to do this? Thanks in Advance

    A 1 Reply Last reply
    0
    • S siddisagar

      Hi Team, I am having problem with window. I am having one path I am taking in String. On button click I am calling Response.Redirect (str) where str=path of the url. I need to open the url in another browser how to do this? Thanks in Advance

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      To open in a new browser window, you should use window.open rather than Response.Redirect. Response.Redirect works in Server side, so it just replaces the url you called with the url you redirect for. If you want this to open in a new window, either write a javascript block element in the button_click (You might use this.ClientScript.RegisterStartupScript) from the server, or you may use javascript directly from the client to open in a new window and call the url from the new window using onclick="javascript:window.open('url.aspx','');" like this. Cheers. :rose:

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Simplify Code Using NDepend
      Basics of Bing Search API using .NET
      Microsoft Bing MAP using Javascript

      P 1 Reply Last reply
      0
      • A Abhishek Sur

        To open in a new browser window, you should use window.open rather than Response.Redirect. Response.Redirect works in Server side, so it just replaces the url you called with the url you redirect for. If you want this to open in a new window, either write a javascript block element in the button_click (You might use this.ClientScript.RegisterStartupScript) from the server, or you may use javascript directly from the client to open in a new window and call the url from the new window using onclick="javascript:window.open('url.aspx','');" like this. Cheers. :rose:

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Simplify Code Using NDepend
        Basics of Bing Search API using .NET
        Microsoft Bing MAP using Javascript

        P Offline
        P Offline
        Pankaj Saha
        wrote on last edited by
        #3

        use the following code to open a new window

        window.open('pagename.aspx', '_blank');

        If you want to open a window with specific size then use window.open('Pagename.aspx', 'Help', config = 'height=800,width=1013,left=' + left + ', toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, directories=no, status=no'); :)

        Pankaj

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups