title: How to open page in new tab from GridView?
body: <p>I want to open page in new tab while clicking on the gridview link button. But I want to open new page based on alert type. For example, from the given below grid I clicked link button of Alert1 then it should open <strong><code>alert1.aspx</code></strong> page, if it is Alert2 then <strong><code>alert2.aspx</code></strong>. etc
  Help me to find a proper solution. Thank you.</p>
  
  <p><strong>GridView:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/mEJiI.jpg" alt="enter image description here"></p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ShowHeader="False"&gt; 
      &lt;Columns&gt;
      &lt;asp:TemplateField HeaderText="Alert Type" SortExpression="Alert_Type"&gt;
      &lt;EditItemTemplate&gt;
      &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Eval("Alert_Type") %&gt;'&gt;
      &lt;/asp:Label&gt;
      &lt;/EditItemTemplate&gt;
      &lt;ItemTemplate&gt;
      &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Bind("Alert_Type") %&gt;'&gt;
      &lt;/asp:Label&gt;
      &lt;/ItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
      &lt;asp:BoundField DataField="Created_Time" HeaderText="Created Time" 
      ReadOnly="True" SortExpression="Created_Time" /&gt;
      &lt;asp:TemplateField &gt;
      &lt;ItemTemplate&gt;
      &lt;asp:LinkButton ID="lnk" runat="server" Text="Click" OnClick="lnk_Click"&gt;
      &lt;/asp:LinkButton&gt;
      &lt;/ItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
      &lt;/Columns&gt;                
   &lt;/asp:GridView&gt;
  </code></pre>
  
  <p><strong>C#:</strong></p>
  
  <pre><code>protected void lnk_Click(object sender, EventArgs e)
  {
  Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", "window.open('alert1.aspx','_newtab');", true);
  }
  </code></pre>