Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How do you check the value of a datalist item within the Daalist bubble.

Reply
Thread Tools

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

 
 
Mark Sandfox
Guest
Posts: n/a
 
      03-04-2004
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">

<aspataList 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>

</aspataList>

</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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with DataList within DataList Will ASP .Net Web Controls 4 10-18-2007 03:19 AM
How do you bind a datalist that is inside a bound datalist =?Utf-8?B?QVNQIERldmVsb3Blcg==?= ASP .Net 2 09-26-2006 02:18 AM
setting ItemTemplate value to DataList item index? Stimp ASP .Net 3 09-10-2004 09:25 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Change style of a single row of the item list of datagrid, based on a field value of current item... QUASAR ASP .Net Datagrid Control 6 01-17-2004 07:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57