How do I make asp:hyperlink control force to open a new page?
Posted on 2013-12-31
I have a asp:hyperlink control for which I am setting the NavigateURL value dynamically. I want to 'force' the link to ALWAYS open in a new window across ALL browsers. With Target="_blank" currently it sometimes opens in a tab and sometimes in a new window, but for this specific instance I want it to always open a new window.
<asp:hyperlink ID="PDF_Link" Target="_blank" NavigateUrl="~\random.pdf" runat="server"> <img height="24px" width="24px" src="Images/PDF_1.jpg" /> </asp:HyperLink>