0
votes

I have a logLink column in my database. I have my hyperlink field in gridView as below :

 <asp:HyperLinkField DataNavigateUrlFields="logLink" DataTextField="logLink" DataNavigateUrlFormatString="{0}" Text="Link"  ControlStyle-CssClass="hlink" HeaderText="LOG LINK" ItemStyle-Width="6%" ItemStyle-Font-Underline="true" />

But this link is not clickable.

I want the values in the log link column of my db to come here.

Does anyone know how to solve this ?

1
DataNavigateUrlFormatString is wrong.Amit
What is wrong in that ?user1698232
My requirement is that I just want to go to a link where link=value in LogLink columnuser1698232
you can also use asp:HyperLink in templatefield.Manish Sharma

1 Answers

0
votes

try this.

<asp:TemplateField>
        <ItemTemplate>
            <asp:HyperLink ID="lnk" runat="server" Target="_blank" Text='<%# Eval("yourText") %>'
                NavigateUrl='<%# Eval("logLink") %>'></asp:HyperLink>
        </ItemTemplate>
</asp:TemplateField>