D
D. Shane Fowlkes
This should be really simple. I've asked this a few times on various board
and have never received an answer. =(
I have a Template which is bound to rows of data. Whoopie. Some of my
items in the Template may not contain data and thus, they display as an
empty line on the page. How can I use a little logic and have the template
SKIP the item if it's Null or Empty?
For example:
<%# Container.DataItem("Address") %><br />
<%# Container.DataItem("Address2")%><br />
<%# Container.DataItem("City") %>, <%# Container.DataItem("State") %>, <%#
Container.DataItem("Zip") %><br />
"Address2" might be empty. If it is, how can I skip this line all together
so a blank line doesn't appear on the page?
I've tried various versions of IF and IsDbNull and have not had any luck.
This doesn't work but I'm looking for something that accomplishes the same
thing...
<%#
If Container.DataItem("Address2") <> "" Then
Container.DataItem("Address2") & "<br />"
End If
%>
Thanks
and have never received an answer. =(
I have a Template which is bound to rows of data. Whoopie. Some of my
items in the Template may not contain data and thus, they display as an
empty line on the page. How can I use a little logic and have the template
SKIP the item if it's Null or Empty?
For example:
<%# Container.DataItem("Address") %><br />
<%# Container.DataItem("Address2")%><br />
<%# Container.DataItem("City") %>, <%# Container.DataItem("State") %>, <%#
Container.DataItem("Zip") %><br />
"Address2" might be empty. If it is, how can I skip this line all together
so a blank line doesn't appear on the page?
I've tried various versions of IF and IsDbNull and have not had any luck.
This doesn't work but I'm looking for something that accomplishes the same
thing...
<%#
If Container.DataItem("Address2") <> "" Then
Container.DataItem("Address2") & "<br />"
End If
%>
Thanks