By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,383 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,383 IT Pros & Developers. It's quick & easy.

Image is ambiguous imported from name space or types

P: n/a
Using VB.net in the Page_Load Sub I'm trying to create a dynamic Navigation
control
nothing fancy, nothing tricky.

I dim some variables (below)

Dim tb As Table
Dim row As TableRow
Dim cell As TableCell
Dim img As Image
Dim lnk As HyperLink

All is well except I get a blue line under Image ( indicating something is
wrong) and when I compile the error is

'Image' is ambiguous, imported from the namespaces or types
'System.Web.UI.WebControls, System.Drawing'.

found some posting on google when searching for +"ambiguous" +"net" +"image"
that looked promicing but all were in another language

--
The Netmeister
Jul 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
netmeister wrote:
Dim img As Image

'Image' is ambiguous, imported from the namespaces or types
'System.Web.UI.WebControls, System.Drawing'.
It's telling you that it doesn't know which Image you want to create.
There is an Image class in the System.Web.UI.WebControls namespace and
also an Image class in the System.Drawing namespace. It doesn't know
which one you mean.

You will need to fully quality which one you want with either:

Dim img As System.Web.UI.WebControls.Image

-OR-

Dim img As System.Drawing.Image
Chris

Jul 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.