I want to find control inside datalist, i am using this:
((Image)DataList1.Items[0].FindControl("Image1")).Visible=true;
//here got error: Index was out of range. Must be non-negative and less than the size of the collection.
here is my aspx code:
<asp:DataList ID="DataList1" runat="server" DataKeyField="nsid">
<ItemTemplate>
<asp:Label ID="Label1" Text='<%# Eval("ncompany") %>' Runat="Server" CssClass="subject&quo
View Complete Post