Asp.NET hyperlink to get eval from field in Gridview
Posted
by MarceloRamires
on Stack Overflow
See other posts from Stack Overflow
or by MarceloRamires
Published on 2010-04-26T18:37:03Z
Indexed on
2010/04/26
18:43 UTC
Read the original article
Hit count: 314
I have a gridview, with a template field that has an HyperLink:
<asp:TemplateField ItemStyle-Width="12%" HeaderText="VER" HeaderStyle-HorizontalAlign="Center" SortExpression="Ver" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" NavigateUrl="~/Admin/Teste/Teste.aspx?rac=<%#Eval('idApontamento')%>" runat="server">TEXT</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
I am getting The server tag is not well formed.
in the HyperLink line.
What should I do in order to directly build a querystring in an HyperLink ?
© Stack Overflow or respective owner