open a new window by clicking on a button in c #

1

I am trying to create a new function for a web application that I have been creating in C #, what I need to do is that by clicking on a button called guardar , the action of saving the data is performed and apart from that opens a new tab in the browser with a report that is built, for now I have the function that when I click save it redirects me to the report

Response.Redirect("../Visor/ConstruirReporte.aspx?Reporte=CRE9&id=" + TextBoxRecibo.Text);

As I could do to tell you to open that report in a new tab

Greetings!

    
asked by Andrex_11 08.06.2018 в 17:16
source

1 answer

1

opening a new tab is an instruction on the client side, not on the server side.

what you should do is instruct the server to write a function on the client side to open a new tab

   Response.Write("<script> window.open('" + pageurl + "','_blank'); </script>");
    
answered by 09.06.2018 / 00:11
source