If you are using a DataSource, you don't need to use Eval
<asp:HyperLinkField HeaderText="Title"
DataNavigateURLFields="GridNavigationURL" DataTextField="Title"
SortExpression="Title">
<HeaderStyle Width="250px" />
</asp:HyperLinkField>
I use it in this way (GridNavigationURL and Title are column from the
Datasource)
HTH
Braulio
/// ------------------------------
/// Braulio Diez
///
///
http://www.tipsdotnet.com
/// ------------------------------
"Valli" wrote:
> Hi,
>
> I need to display an hyperlink column in gridview where if the user
> clicks that column the page should move to the selected page.
> I have got help from this group & started using template field. After using
> this, I couldnt see a column supporting hyperlink.
> In the gridviews first column header, there appears an hyperlink with the
> first record link displaying. That also only in header overwriting with the
> first column caption.
>
> can anyone help me in this..
>
> My code follows here...
>
> <asp:TemplateField>
> <ItemTemplate>
>
> <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%#
> Eval("FileLink") %>'
>
> Style="z-index: 100; left: 0px; position: absolute; top: 0px" Text='<%#
> Eval("FileLink") %>'></asp:HyperLink>
>
> </ItemTemplate>
>
>
> </asp:TemplateField>
>
> --FileLink is the datafield name which provides the link
> --
> Thanks & Regards
> Valli
>
>
>