DataList Control Formatting Question

Discussion in 'ASP .Net Datagrid Control' started by Jack Sprat, Aug 5, 2004.

  1. Jack Sprat

    Jack Sprat Guest

    Hi

    I have a Datalist control and am using it to display some data (snippet
    below). Sometimes there is no record for, say, "Mobile". In this case i do
    not want to display any of the HTML associated with "Mobile". How can i
    achieve this?

    Thanks in advance.

    <tr>
    <td class="examinerhead">Telephone:</td>
    <td class="examinervalue"><%# container.dataitem("Telephone") %></td>
    </tr>
    <tr>
    <td class="examinerhead">Mobile:</td>
    <td class="examinervalue"><%# container.dataitem("Mobile") %></td>
    </tr>
    <tr>
    <td class="examinerhead">Fax:</td>
    <td class="examinervalue"><%# container.dataitem("fax") %></td>
    </tr>
    <tr>
    <td class="examinerhead">Email:</td>
    <td class="examinervalue"><a href="mailto:<%#
    container.dataitem("Email") %>"><%# container.dataitem("Email") %></a></td>
    </tr>
    Jack Sprat, Aug 5, 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. Joe
    Replies:
    3
    Views:
    465
  2. Leo Duran
    Replies:
    2
    Views:
    3,439
  3. Moe Sizlak

    formatting the display of a datalist?

    Moe Sizlak, Aug 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    500
    Moe Sizlak
    Aug 2, 2004
  4. Nevyn Twyll
    Replies:
    8
    Views:
    1,864
  5. Jack Sprat

    DataList Control Formatting Question

    Jack Sprat, Aug 5, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    91
    Jack Sprat
    Aug 5, 2004
Loading...

Share This Page