I have a gridview and one of the columns is a link to websites. Right now I have it set to a target of "_parent". This fine for website links, but I have links to PDF files. I want PDF file link to have a target of "_Blank". Is there a way I can do this?
<AlternatingRowStyle BackColor="#DCDCDC" /> <Columns> <asp:TemplateField HeaderText="Link" SortExpression="Link"> <ItemTemplate> <asp:HyperLink NavigateUrl='<%# Eval("Link","{0}") %>' Visible='<%# (Eval("Link")==DBNull.Value ? false : true) %>' Text="Link" runat="server" Target="_parent" /> </ItemTemplate> </asp:TemplateField>```
1.4m articles
1.4m replys
5 comments
57.0k users