Question: 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 page in a new tab?

```
protected void btnSave_Click(object sender, EventArgs e)
{
    ...//some code to insert records
    Response.Redirect("NewQuote.aspx?val=" + this.txtQuotationNo.Text);//displaying gridview in other page to print what needed
}

```

Answer: 
Simple solution is here.

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

```
<asp:Button ID="myButton" runat="server" CssClass="btn1"
            OnClick="btnSave_Click" OnClientClick="target ='_blank';" />

```

Then in btnSave\_Click

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

```
if you are using http
then use below code

```
Response.Write("<script>window.open ('URL','_blank');</script>");

```

this code cannot be used for https
for https do below

javascript in page

```
function shwwindow(myurl) {
    window.open(myurl, '_blank');
}

```

in c# code behind

```
 string URL = ResolveClientUrl("~") + "**internal page path**";
    ScriptManager.RegisterStartupScript(this, this.GetType(), "show window", 
    "shwwindow('"+URL+"');", true);

```

this code cannot bybass the browser popup blocker. user must allow it to run.
for ie it opens in new window or new tab up to ie version
in firefox and chrome it opens new tab

enjoy it!!