>It's your code and would work this way 99.9%. It would be better IMHO if you compare type to type (w/o ToString() comparison). In C# it's as easy as:
>
>if ( loControl.GetType() == typeof(System.Web.UI.WebControls.Image) )
>
>However in VB I found it hard to find compatible code:
>
>if ( loControl.GetType().Equals( System.Type.GetType("System.Web.UI.WebControls.Image") ))
>
Cetin
I thought the addition of GetType() was the equivalent of what you mention. It does work well as is as I just tested it and it goes in for ImageMap when it is a type of ImageMap only and it goes in the other condition when it is a type of Image only.