Currently, the following code shows a blank line if Address2 (which comes from the database) is Null. How can I condition on the value of <%#Container.DataItem(“Address2”)%> so I can get rid of the blank line if Address2 does not exist (or is Null) in the database? If code in the code-behind is needed, please provide in VB.
<asp:repeater id="rptLabels" runat="server">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<span style="text-align:left;">
<%#Container.DataItem("Address")%><br />
<%#Container.DataItem("Address2")%><br />
</span>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:repeater>
I ended up doing more in the code behind where I am more comfortable than the aspx page to resolve this issue.