What I'm trying to achieve is to use the Eval parameter in my href anchor tag. An anchor is built into the repeater, so I cannot use the code to achieve this.
I tried a few things with no luck.
<a href="http://MyWebsite/ActiveUsers?ID=InsertEvalHere"><%# Eval("Name")%></a>
The following code below is what I was trying to do:
<a href="<% "http://MyWebsite/ActiveUsers?ID=" + DataBinder.Eval(Container.DataItem("ID"))%>"><%
<a href="<% "http://MyWebsite/ActiveUsers?ID=" + Eval("ID")%>"><%
<a href="http://MyWebsite/ActiveUsers?ID=<% DataBinder.Eval(Container.DataItem("ID"))%>"><%
<a href="http://MyWebsite/ActiveUsers?ID=<%# Eval("ID")%>"><%
None of the above seemed correct, as I continue to receive this error - The tag is not formed.
How should I do it?
source
share