Here is a sample of the code I am using
Web Form
<asp:Repeater id="Repeater1" runat="server"
DataSource="<%# nad_Data1 %>" EnableViewState="False">
<ItemTemplate>
<tr>
<td bgcolor="AntiqueWhite" align="left">
<asp:Label Runat=server ID="lblAddr1" Text =
'<%#Check_Labels("ADDR_1")%>'/>
</td>
Code Behind:
public string Check_Labels(string fieldname)
{
string buf = "";
int Count = Repeater1.Items.Count;
for(int i = 0; i <= Count;i++)
{
DataTable dt = tablename.Tables[0];
buf = dt.Rows[i][fieldname].ToString();
}
{
return buf;
}
When the field is null or empty I need to set the display style to none.
I need to see an example of how this can work.
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!