Page 1 of 1

Logos and Images error

Posted: Wed Nov 19, 2008 6:28 am
by num5labonte
VERSION: 7.0 BUILD: 10152

When selecting Website / Logos and Images the page generates the following error:

CS0104: 'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image'
Line 105: if (!string.IsNullOrEmpty(logoUrl))
Line 106: {
Line 107: Image logo = new Image();
Line 108: logo.ImageUrl = logoUrl + "?tag=" + StringHelper.RandomNumber(6);
Line 109: CurrentLogo.Controls.Add(logo);

Source File: d:\websites\ac_7_0_stable_b10152\Admin\Website\LogoAndImages.aspx Line: 107

Any ideas? I would like to resize the product images to display as a custom size and read in the forums that this is where I can accomplish this.

Thanks.

Re: Logos and Images error

Posted: Wed Nov 19, 2008 7:03 am
by mazhar
I am unable to produce the problem on the final demo. You can try a quick fix in your case and prefix the Image class with System.Web.UI.WebControls namespace as below

Code: Select all

System.Web.UI.WebControls.Image logo = new System.Web.UI.WebControls.Image();

Re: Logos and Images error

Posted: Wed Nov 19, 2008 7:17 am
by num5labonte
mazhar wrote:I am unable to produce the problem on the final demo. You can try a quick fix in your case and prefix the Image class with System.Web.UI.WebControls namespace as below

Code: Select all

System.Web.UI.WebControls.Image logo = new System.Web.UI.WebControls.Image();
Thanks mazhar. That did the trick.