image ll=(Image)e.Item.FindControl("imageID");
报'Image' is an ambiguous reference的错误,我开始以为有两个错误一个是image首字母没有大写其次就是没有判断单元类型的错误,经过询问才知道根本就不是那么回事,经过google下原来“This happens because one of your import statements called 'System.Drawing' that has an Image child object, just like 'System.Web.UI.WebControls' So use a fully qualified namespace reference.”因为System.Drawing下面有个Image类,而同时System.Web.UI.WebControls下面也有个Image控件因此弄的报错,所以只要写全类型转换的namespace就可以了
System.Web.UI.WebControls.Image ll=(System.Web.UI.WebControls.Image)e.Item.FindControl("imageID");
相关文章:1。http://forums.asp.net/thread/1236833.aspx
2。http://www.thescripts.com/forum/thread261575.html