Omi Omi - 12 days ago 5
ASP.NET (C#) Question

How to use a Linkbutton to open into a new tab?

I am using a

linkbutton
within a
gridview
control.I want to open the data into a new tab.I tried to set
target="_blank"
.
But it is not working.
I have tried doing this.This is my source code:

<asp:LinkButton ID="LinkButton1" runat="server"
CommandArgument="<%# Container.DataItemIndex %>" CommandName="###"
Font-Underline="False" Text='<%# Eval("###") target="_blank" %>' />


Please guide me and give me suggestions where I am doing wrong.

Answer

At most you can make it open into a new window and depending on the users internet settings it will open in a new tab. There's no way to make it open in a new tab though.

http://www.webmaster-talk.com/html-forum/32504-hyperlink-target-open-in-new-tab.html

Also check out this page:

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

Comments