Both Azat and Gregory gave good possible solutions for this the last time
you asked. Personally, I'd prefer to filter out the rows where the value is
"empty" but if your solution doesn't allow for that, you can
programmatically hide the link during the ItemDataBound event
(
http://msdn.microsoft.com/library/de...oundtopic.asp).
If you want to hide it by setting the link's Visible property to false or by
appending a display: none to its class attribute is up to you. Of course,
in order to access the link from the event handler, you'll have to either
set Runat="Server" on the link OR switch to using <asp:hyperlink ...>.
You'll also want to give the control an ID so you can easily access it
through FindControl().
HTH
----------------
Dave Fancher
http://www.davefancher.com
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:eB**************@TK2MSFTNGP10.phx.gbl...
Hello,
I have this code line inside an ASP.Net Repeater:
<a href='<%# DataBinder.Eval(Container.DataItem, "link") %>'><%= readMore
%></a>
What I need to do is:
1. Show readMore value if <%# DataBinder.Eval(Container.DataItem, "link")
%> is not empty.
2. Show nothing if <%# DataBinder.Eval(Container.DataItem, "link") %> is
empty.
In this moment it is showing all the time the value of readMore.
Or maybe just hide the <a> tag.
Is this possible?
Thanks,
Miguel