How do you check the value of a datalist item within the Daalist bubble.

M

Mark Sandfox

What I need to do is simple in any other code, but I am having a problem
finding the correct syntax for this function.



I have the following:



<form Runat="Server">

<asp:DataList ID="dlstCalendar" Runat="server">

<ItemTemplate>



<div align="left">

<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="600">

<tr>

<td><hr color="#008000"></td>

</tr>

</table>

</div>

<div align="left">

<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="600">

<tr>

<td align="center" valign="top"><font face="Arial">

<%# Container.DataItem("EventTitle")%>

</font></td>

</tr>

<tr>

<td align="center" valign="top"><font face="Arial">

<%# Container.DataItem("EventDate")%>

</font></td>

</tr>

<tr>

<td align="center" valign="top"><font face="Arial">

<%# Container.DataItem("EventTime")%>

</font></td>

</tr>

<tr>

<td align="center" valign="top"><font
face="Arial">&nbsp;</font></td>

</tr>

</table>

</div>

<div align="left">

<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="600">

<tr>

<td align="center" valign="top"><font face="Arial">

<%# Container.DataItem("EventLocation")%>

</font></td>

</tr>

<tr>

<td align="center" valign="top"><font face="Arial">

<%# Container.DataItem("EventAddress")%>

</font></td>

</tr>

<tr>

<td align="center" valign="top"><font face="Arial">

<%# Container.DataItem("EventCityStateZip")%>

</font></td>

</tr>

***If statement needed

<tr>

<td align="center" valign="top"><font
face="Arial">&nbsp;</font></td>

</tr>

***End if

</table>

</div>

<div align="left">

<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="600">

<tr>

<td><pre><font face="Arial" Size="3"><%#
Container.DataItem("EventDescription")%></font></pre></td>

</tr>

</table>

</div>

<div align="left">

<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="600">

<tr>

<td align="center" valign="top"><font face="Arial">

<a target="_blank" href="http://<%#
Container.DataItem("EventLink")%>">More Information</a>

</font></td>

</tr>

</table>

</div>





</ItemTemplate>

</asp:DataList>

</form>





What I need to do is check the value of Location, Address, and CityStateZip
and if any of these fields have text then I need to add a spacer so that it
does not meld with the description.



How do I make the follow statement work with the datalist bubble:



If Container.DataItem("Location") <> "" then



End if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top