Daves:
Your statement isn't fully accurate. You can use FindControl("MyImg")
within the image's parent control and all will work as expected. For
example ,if you are in the ItemDataBound event, you could do
e.Item.FindControl("MyImg") e is the argument which is received.
If you aren't in the ItemDataBoundEvent you can simply loop thorugh all the
items of the datalist'
for each item as DataListItem in myList.Items
'item.FindControl
next
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Daves" <db****@simnet.is> wrote in message
news:uK*************@TK2MSFTNGP09.phx.gbl...
say I have a Datalist and each row has a image control with ID "MyImg". I
am hiding/showing each image based on a result from the database. I need
to find that particular img control to access it's properties. Obviously
it isn't possible to just say FindControl("MyImg") since there are
multiple instances of it. I once found an article on this subject but
cannot find it now, anyone?