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>
Use eval with a formatter:
<asp:HyperLink
ID="HyperLink1"
runat="server" ForeColor="Blue"
Text='<%# Eval("UploadDate") %>'
NavigateUrl='<%# Eval("RefNum", "/ASPX/UploadContact/UploadContact.aspx?RefNum={0}")%>'
/>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments