I would like to use the find control method to find a image on the designer and make it visible, but i keep getting a null
This is my Code:
foreach (ImageShow image in imageList)
{
Image Showimage = (Image)FindControl(image.imageName);
Showimage.Visible = true;
}
Any help would be much appreciated,
Thanks in advance
FindControl does not search throughout a hierarchy of controls, I presume that this is a problem.
try using the following method :
Usage:
In your case parent is this, example :
You can use it without ID, then will find first occurrence of T :