I have a hyperlink on my page and I would like it to automatically open in a new tab when clicked, how would I do this? If this is not possible I will accept new window.
The syntax is following:
<a href="http://www.someurl.com" target="_blank">
This will open the page in new page or tab this depends on browser configuration.
Use the following
<asp:HyperLink ID="hplStandard" runat="server" ForeColor="Green"
Font-Bold="True" Target="_blank">Standard Report</asp:HyperLink>
add
target="_blank" in your link.
If you want links on whole page to be open in new tab you can use.
<head>
<title></title>
<base target="_blank"/>
</head>
CSS3 offers a target-new property for which you can specify window | tab | none
:
If a user wanted to have new windows open in new tabs instead, she could use the following user style sheet to do so:
* { target-new: tab ! important }
This depends on how the browser treats the target
attribute on the a
(anchor) tag
When target="_blank"
, older browsers, which don't have tabbing, will open a new window.
Newer browsers, however, will use this to open a new tab.
set the property Target to _blank