I'm loading links into a gridview, but if they aren't appended with http:// it goes to my server. So something like www.yahoo.com when clicked would go to http://localhost:1304/.../controls/www.yahoo.com. How would I make the browser open a new window to whatever is in the link field when clicked besides doing string manipulation.
I've tried both asp:hyperlinkfield and templatefields
<asp:TemplateField HeaderText="Link">
<ItemTemplate>
<asp:HyperLink runat="server" Text='<% #(Eval("Link")) %>' NavigateUrl='<% #Eval("Link") %>' />
</ItemTemplate>
</asp:TemplateField>
<%--<asp:HyperLinkField DataTextField="Link" HeaderText="Link" SortExpression="Link" DataNavigateUrlFormatString="{0}" DataNavigateUrlFields="Link" Target="_blank" />--%>
Here is some source from the page. The comcast link appends itself to a local destination while the yahoo one is fine.
<td>15478963</td><td>test data - comcast</td><td><a href="Controls/www.comcast.net" target="_blank">www.comcast.net</a></td><td align="right">12/23/2009</td><td>Justen</td>
</tr><tr style="color:Black;background-color:Gainsboro;">
<td>12345678</td><td>Update works!</td><td><a href="http://www.yahoo.com" target="_blank">http://www.yahoo.com</a></td><td align="right">12/23/2009</td><td>Justen</td>