How to open page in new tab using the response. redirect at asp.net

后端 未结 8 2228
太阳男子
太阳男子 2021-01-03 23:42

I want to open a new tab or a new page by using Response.Redirect in a button click handler. I\'m using a query string to pass some values. How can I open he pa

8条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 00:07

    Simple solution is here.

    Edit your html button element and add attribute OnClientClick="target ='_blank';".

    
    

    Then in btnSave_Click

    protected void btnSave_Click(object sender, EventArgs e) { 
        Response.Redirect(url);
    }
    

提交回复
热议问题