I am trying to either show or hide a link based on the value of an Eval within my list view
I would like to do something like this
but I cannot use these tags in a listview
I have also tried to do it based on the visible property of the anchor tag
but I get this error:
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
Any ideas for this?
Web Development Manager
I would like to do something like this
Code:
<% if Eval("value") <> "" then %>
display link
<% end if %>
but I cannot use these tags in a listview
I have also tried to do it based on the visible property of the anchor tag
Code:
<a href="mylink.aspx" visible="<%# iif(Eval("value") = "", "false", "true")%>">link</a>
but I get this error:
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
Any ideas for this?
Web Development Manager