I have the following in my repeater:
<div class="LabelHolderrepeatershort" style="font-size:10px"><%#DataBinder.Eval(Container.DataItem, "id")%></div>
<div class="LabelHolderrepeatershort"><%#DataBinder.Eval(Container.DataItem, "Date", "{0:M/d/yy}")%></div>
<div class="LabelHolderrepeater"><%#DataBinder.Eval(Container.DataItem, "Hours")%></div>
<div class="LabelHolderrepeater" style="font-size:10px"><%#DataBinder.Eval(Container.DataItem, "Note")%></div>
<div class="LabelHolderrepeater"><%#DataBinder.Eval(Container.DataItem, "DateSubmitted")%></div>
<div class="clear"></div>
</div>
How can I print an empty string when Note
is NULL
because the DateSubmitted
div is being displayed where the Note
div when Note
is NULL
you can use ternary operator, like this