Build a HyperLink in a GridView in ASP.NET webforms - Eval not working
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
19:33 UTC
Read the original article
Hit count: 290
I have a gridview with a template field that has a 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 a HyperLink ?
© Stack Overflow or respective owner