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

Discussion in 'ASP .Net' started by Mark Sandfox, Mar 4, 2004.

  1. Mark Sandfox

    Mark Sandfox Guest

    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
    Mark Sandfox, Mar 4, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nevyn Twyll
    Replies:
    8
    Views:
    1,833
  2. Neil
    Replies:
    1
    Views:
    1,924
  3. =?Utf-8?B?QVNQIERldmVsb3Blcg==?=

    How do you bind a datalist that is inside a bound datalist

    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=, Sep 25, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    558
    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=
    Sep 26, 2006
  4. mlimber
    Replies:
    0
    Views:
    778
    mlimber
    Aug 5, 2008
  5. Will

    Problem with DataList within DataList

    Will, Oct 10, 2007, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    176
    Walter Wang [MSFT]
    Oct 18, 2007
Loading...

Share This Page