how to open a page in new tab on button click in asp.net?

前端 未结 16 2163
情书的邮戳
情书的邮戳 2020-11-29 07:32

I want to open a page in new tab of browser on button click.

I have searched a lot on google but i couldn\'t find anything.

Here is my button.



        
16条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-29 07:49

    You have to use Javascript since code behind is server side only. I am pretty sure that this works.

    
    
    protected void btnNewEntry_Click(object sender, EventArgs e)
    {
      Response.Redirect("New.aspx");
    }
    

提交回复
热议问题