open two page in two new tab RRS feed

  • Question

  • User-807418713 posted


    I Have button once i click i want to open two tab

    Default.aspx and Test.aspx

    How to open.. Thanking You

    Tuesday, January 19, 2021 6:56 AM


All replies

  • User753101303 posted


    See https://developer.mozilla.org/en-US/docs/Web/API/Window/open  ie assuming they are both at the root oif the web site javascript code such as:


    Make sure this kind of navigation won't confuse users.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 19, 2021 10:53 AM
  • User-807418713 posted


    I want both in c# code behind page..? not using javascript..?

    Thanking You

    Tuesday, January 19, 2021 10:59 AM
  • User753101303 posted


    Technically speaking only the browser can open a new browser window. C# code running on the server side doesn't know at all about browser windows and is just responding to http requests.

    You can still render JavaScript code from C# that will then run in the browser or if you need to run an http query without really opening a window, you can handle one of those two http querires from the server side using for example the HttpClient class.

    Make sure to understand what haqppens on the client side and what happens on the web server side.

    Tuesday, January 19, 2021 1:20 PM