[RESOLVED] Opening new windows with asp:HyperLinkField
Hi all,
Hope someone can offer a few pointers. I have a gridview control with a hyperlink column like this...
Code:
<asp:HyperLinkField .... DataNavigateUrlFormatString="./Default.aspx" Target="_blank" />
Is there any way I can force this to open in a new window, instead of opening a new tab?
Grateful for any tips!
Dom
Re: Opening new windows with asp:HyperLinkField
You can use javascipt to open a new window but otherwise Target="_blank" will open in a new tab or window depending on the browser settings.
Re: Opening new windows with asp:HyperLinkField
Thanks fishcake, thought that might be the case.
Hmph - javascript it is then!
Re: [RESOLVED] Opening new windows with asp:HyperLinkField
Hello,
The HyperLinkField has a target property:
http://msdn.microsoft.com/en-us/libr...ld.target.aspx
Which if you set to "_blank" will cause the link to open in a new window.
Gary
Re: [RESOLVED] Opening new windows with asp:HyperLinkField
Quote:
Originally Posted by
gep13
domjack was already using Target="_blank" but was asking about always opening a new window rather than the browser deciding whether to open a new tab or a new window.
Re: [RESOLVED] Opening new windows with asp:HyperLinkField
Woah, I completely missed that!! Must have read the original post wrong, and now that I look at it, yours too.
Apologies!!
Gary