S
Stan
Hi all! I'm trying to set the visibilty of a label in the itemtemplate
of a repeater control. The repeater is bound to a datatable. It is
possible that a row of this datatable is empty, in that case I would
like to hide the label, not within my code-behind but within the 'aspx'
(because the label is part of the itemtemplate it gets rendered in the
following format 'UserControlId_RepeaterId_counter_LabelId).
So I tried this (after searching several newsgroups):
visible=<%# (DataBinder.Eval(Container,
"DataItem.Instantie_naam").Equals(String.Empty)) ? "false" : "true" %>
I can't get this to work, an ASP.NET error message is displayed in my
browser:
CS0030: Cannot convert type 'string' to 'bool'
Anybody any ideas? Thanks in advance!
Regards,
Stan.
of a repeater control. The repeater is bound to a datatable. It is
possible that a row of this datatable is empty, in that case I would
like to hide the label, not within my code-behind but within the 'aspx'
(because the label is part of the itemtemplate it gets rendered in the
following format 'UserControlId_RepeaterId_counter_LabelId).
So I tried this (after searching several newsgroups):
visible=<%# (DataBinder.Eval(Container,
"DataItem.Instantie_naam").Equals(String.Empty)) ? "false" : "true" %>
I can't get this to work, an ASP.NET error message is displayed in my
browser:
CS0030: Cannot convert type 'string' to 'bool'
Anybody any ideas? Thanks in advance!
Regards,
Stan.