The type '_Default' is ambiguous

Discussion in 'ASP .Net' started by Guest, Sep 10, 2005.

  1. Guest

    Guest Guest

    How do you solve this problem, I seen a web page about this but I still very
    new to 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
    '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"

    Source File: /Pictures/Default.aspx Line: 1
    Guest, Sep 10, 2005
    1. Advertisements

  2. Guest

    Mark Guest

    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
    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

    LL'. Please specify the assembly explicitly in the type name.
    Mark, Sep 11, 2005
    1. Advertisements

  3. Guest

    Guest Guest

    Yeah I saw that web page..

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

    What does that mean thou :(
    Guest, Sep 11, 2005
  4. Guest

    Mark Guest

    Hi, take a look at this link re namespaces

    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

    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
    Mark, Sep 11, 2005
  5. Guest

    Guest 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.
    Guest, Sep 16, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.