Image Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

when i write Image img = new Image();
img.ImageUR="url";

I get the error: image is a ambigous reference

I have included reference at top: using system.web.ui.webcontrols

Please help

Thanks

Manny
 
Manny said:
when i write Image img = new Image();
img.ImageUR="url";

I get the error: image is a ambigous reference

I have included reference at top: using system.web.ui.webcontrols

There is an Image class in the System.Drawing namespace, too. So if you
have a using System.Drawing up at the top, this is why there is the
ambiguity. Just spell out the class name fully:

System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image();
img.ImageUrl = "...";


hth

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
Back
Top