473,382 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Error: 'Image' is an ambiguous reference

I am trying to execute the following code...

((Image)e.Item.FindControl("imgStatus"))

.... i get the error: "'Image' is an ambiguous reference".

My question is: How am i to convert the "e.Item.FindControl" to an Image
control?

Thanks?
Nov 16 '05 #1
3 9653
"charliewest" <ch*********@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
I am trying to execute the following code...

((Image)e.Item.FindControl("imgStatus"))

... i get the error: "'Image' is an ambiguous reference".

My question is: How am i to convert the "e.Item.FindControl" to an Image
control?


((System.Web.UI.WebControls.Image)e.Item.FindContr ol("imgStatus"))

--
Sean Hederman

http://codingsanity.blogspot.com
Nov 16 '05 #2
Hi,

This happen when you include two namespaces that define the same class, in
your case both System.Drawing and System.Web.UI.WebControls namespace define
a Image class,
just use the FQN .

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"charliewest" <ch*********@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
I am trying to execute the following code...

((Image)e.Item.FindControl("imgStatus"))

... i get the error: "'Image' is an ambiguous reference".

My question is: How am i to convert the "e.Item.FindControl" to an Image
control?

Thanks?

Nov 16 '05 #3
Hi,

Regarding the inclusion of System.Drawing, I have no idea why it's
included by default
I just comment it out on all the pages of a project and nowhere was I using
it.

Anybody knows why it's included in the first place?
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Sean Hederman" <us***@blogentry.com> wrote in message
news:ct**********@ctb-nnrp2.saix.net...
"charliewest" <ch*********@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
I am trying to execute the following code...

((Image)e.Item.FindControl("imgStatus"))

... i get the error: "'Image' is an ambiguous reference".

My question is: How am i to convert the "e.Item.FindControl" to an Image
control?


((System.Web.UI.WebControls.Image)e.Item.FindContr ol("imgStatus"))

--
Sean Hederman

http://codingsanity.blogspot.com

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: howie | last post by:
I've upgraded a vb6 application to vb .net and am having an issue. whenever I try to set the recordset property of the VB6.adodc object in .net and run the application I get the error “object...
0
by: Stephen Cairns | last post by:
I have the following rpx file in a .Net solution and I am getting the following build errors which are driving me crazy and ive no idea where I have went wrong. The build errors I'm getting are as...
2
by: Denon | last post by:
Hi, everybody I have a web control, build by VB.net, and if I put two instance on the same aspx, error occur while debugging. Parser Error Message: Ambiguous match found. It highlight the...
2
by: Beffmans | last post by:
Hi When I run this code: using System; namespace DelegateProject { public delegate void MyDelegate(string s);
3
by: shailendrapalsingh | last post by:
hi all i am trying to read excel file through my program. but when i compile i get "Application is ambiguous reference'. error. i am including using Excel;
1
by: brainstormer | last post by:
I'm new to this site and seeking help with an Error message. I have a program in HP called Image Zone. A few weeks ago all my photos disappeared and I got this error message..."Object reference not...
4
by: maddy1 | last post by:
HELLO when ever im trying to execute this, im getting an error as object reference not set to an instance of an object private void button2_Click(object sender, EventArgs e) { ...
1
by: Don | last post by:
I'm getting the following exception displayed in the task list at design time for my project: "Code generation for property 'Controls' failed. Error was: 'Object reference not set to an...
3
by: Francois | last post by:
This is from a Dot Net 1.1 project converted to Dot Net 2.0. In 1.1, all was fine without any problem. In 2.0, on the developement machine all seems more or less OK. In release mode on the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.