hi, i have a datalist as follow
<asp:DataList ID="DataList1" runat="server" RepeatColumns="3" style="z-index: 108; left: 733px; position: absolute; top: 72px" >
<ItemTemplate><asp:Image ID="uximage" runat="server" /></ItemTemplate>
</asp:DataList>
i want to find id of the image control in that datalist.
for that i have written code as (in button click event)
as
protected void Button4_Click(object sender, EventArgs e)
{
foreach(DataListItem item in DataList1.Items)
{
Image im = (Image)item.FindControl("uximage");
im.ImageUrl = "Handler.ashx";
}
}
When i execute the application and when i click on button view all image
.it is not going through the body of foreach .
also when i put a break point and checked the DataList1.Items it is showing the count as 0.
what is wrong in this code ,please help