Is there a way to open an asp:HyperLink.NavigateUrl in a new tab and not change location of the current?
ASP.NET Web Forms HyperLink. It is a control that is used to create a hyperlink. It responds to a click event. We can use it to refer any web page on the server. To create HyperLink either we can write code or use the drag and drop facility of visual studio IDE.
use <asp:HyperLink Target="_blank" />
actually depending on the users settings that may open a new window.
This works for a new tab in FF and Chrome, doesn't seem to work in IE (8), but this may depend on the doctype.
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="http://yoursite.com" Target="_blank"> This will work. </asp:HyperLink>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With