DataList Control Formatting Question

J

Jack Sprat

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>
 

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

Forum statistics

Threads
474,266
Messages
2,571,087
Members
48,773
Latest member
Kaybee

Latest Threads

Top