The type '_Default' is ambiguous

G

Guest

Hi,
How do you solve this problem, I seen a web page about this but I still very
new to asp.net so please elaborate thanks ?

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: The type '_Default' is ambiguous: it could come from
assembly
'E:\Webs\Silverqueen\WWW\Pictures\bin\App_Web_default.aspx.cdcab7d2.DLL' or
from assembly
'E:\Webs\Silverqueen\WWW\Pictures\bin\App_Web_picturesneeded.aspx.cdcab7d2.DLL'. Please specify the assembly explicitly in the type name.

Source Error:


Line 1: <%@ page language="VB" autoeventwireup="false" inherits="_Default" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


Source File: /Pictures/Default.aspx Line: 1
 
M

Mark

Hi, basically it is saying that there are two objects called _Default and
you are wanting to use one of them but it does not know which one to
instantiate.
Use the namespace of the _Default object you want to use when you reference
the object in your page (Find which one by using the object browser to
browse the referenced objects (Dlls)).

I see that you are not the only one having this problem
http://blog.davidyack.com/archive/2005/06/07/568.aspx
hth
Cheers
Mark





TdarTdar said:
Hi,
How do you solve this problem, I seen a web page about this but I still very
new to asp.net so please elaborate thanks ?

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: The type '_Default' is ambiguous: it could come from
assembly
'E:\Webs\Silverqueen\WWW\Pictures\bin\App_Web_default.aspx.cdcab7d2.DLL' or
from assembly
'E:\Webs\Silverqueen\WWW\Pictures\bin\App_Web_picturesneeded.aspx.cdcab7d2.D
LL'. Please specify the assembly explicitly in the type name.
 
G

Guest

Yeah I saw that web page..

"Use the namespace of the _Default object you want to use"

What does that mean thou :(
 
M

Mark

Hi, take a look at this link re namespaces

http://www.csharphelp.com/archives/archive99.html

The problem you are having is that an object is being instantiated by your
application and the compiler does not know which class to use.

The way around that is to explicitly specify the namespace that the class is
associated with

e.g. If I created an image object in code and I had referenced the
System.Drawing namespace in my project then I would receive a similiar error
because the compiler does not know if I want a image object (Ala drag and
drop from the IDE) or a System.Drawing.Image object.

To make it clear that I wanted a System.Drawing.Image object I would have to
explicitly tell the compiler that (To avoid ambiguity, hence your error
message)

so instead of doing this

image myImage = new image...

I would go
System.Drawing.Image = new .... etc

I am explicitly telling the compiler what type of image object I want to
instantiate.
HTH
Cheers
Mark
 
G

Guest

I jsut removed "inherits="_Default"" and it works fine. I have no special
need for
it. So just removeing this from the

<%@ page language="VB" autoeventwireup="false"
solves the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top