datalist

G

Guest

Can anyone tell me how to find a table within a datalist? I can find the
labels and textboxes in the dl and change the formatting based on the data,
but I can't find the table in the DL. Can anyone point me to a code sniippet
or something on finding a table in the datalist?
 
G

GrantMagic

Why don't you move the <tr><td> tags into the <% %> tagles
like follows:

<asp:datalist>
<headertemplate><Table id=test></headertemplate>
<itemtemplate>
<%
if(DataItem == Critaria)
{
"<tr><td>" + DataItem + "</tr></td>"
}
else
{
"<tr><td bgcolor='#cccccc' [or whatever your trying to do>"
+ DataITem + "</td></tr>"
}
%>
</itemtemplate>
<footertemplate></table></footertemplate>
</aspdatalist>
 

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,770
Messages
2,569,586
Members
45,085
Latest member
cryptooseoagencies

Latest Threads

Top