I have the following mark up and code(I have problem in teh code side)
<asp:ListView ID="ListView1" DataSourceID="SqlDataSource1" Visible="false" DataKeyNames="UnitID" ConvertEmptyStringToNull="true" runat="server" >
<LayoutTemplate>
<table cellpadding="2" runat="server" id="tblExcel" width="640px" cellspacing="0">
<tr runat="server" id="itemPlaceholder" />
</table>
</LayoutTemplate>
<ItemTemplate>
<tr id="Tr1" runat="server">
<%--<td>
<asp:CheckBox ID="CheckBox1" runat="server" />
</td>--%>
<td>
<asp:Label ID="lblUnitID" runat="server" Text='<%#Eval("UnitID") %>' />
</td>
<td>
<asp:Label ID="ParishLabel" runat="server" Text='<%# Eval("School") %>' />
</td>
<td>
<asp:Button ID="SelectButton" runat="server" Text="Select"
CommandName="Select"
CommandArgument='<%#Eval("School")%>' />
</td>
<td>
<asp:Label ID="Label2" runat="server" Text=""></asp:Label>
</td>
</tr>
</ItemTemplate>
IN code behind I do to refer to it but getting Object not set...
Dim lblDone As Label = FindControl("Label2")
lblDone.Text = "Done"
I d like to see ways to access the label.
thnks