Dim loControl As System.Web.UI.Control = New System.Web.UI.Control Dim loControlImage As System.Web.UI.WebControls.Image Dim loControlImageMap As System.Web.UI.WebControls.ImageMap For lnCounter = 1 To oApp.ParmCnt(tcID) lcControl = oApp.GetParm(tcID, lnCounter) loControl = oApp.oPage.FindControl(lcControl) ' If the control is an image If TypeOf loControl Is System.Web.UI.WebControls.Image Then loControlImage = CType(loControl, System.Web.UI.WebControls.Image) loControlImage.ImageUrl = oApp.cLanguage + "/" + loControlImage.ImageUrl oApp.AddJavascriptMessage("we should not be here " + loControlImage.ID) End IfIn the message I am showing, it shows in fact that the control is interpreted in this condition. However, the control is ImageMap not Image. But, the compiler takes it as an image and enters in the condition. This is not correct. Is there a way to workaround that bug?