Friday, 27 September 2013

ASP.NET C# - NavigateURL with RecordID combine

ASP.NET C# - NavigateURL with RecordID combine

I am new to ASP.NET. What I try to do is very basic, but I couldn't get it
to work. If you see the NavigateURL link below, I try to combine the URL
with "RefNum" from the database Recordset, but it keeps failing with "The
server tag is not well formed." error.
I am not sure how to combine the URL with a record from recordset.
Please help, Thanks.
<asp:TemplateField HeaderText="UploadDate" SortExpression="UploadDate"
HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:HyperLink
ID="HyperLink1"
runat="server" ForeColor="Blue"
Text='<%# Eval("UploadDate") %>'
NavigateUrl="/ASPX/UploadContact/UploadContact.aspx?RefNum='<%#
Bind("RefNum")%>'"
/>
</ItemTemplate>
</asp:TemplateField>

No comments:

Post a Comment