ambiguous match found

Discussion in 'ASP .Net Building Controls' started by Sam, Jul 21, 2005.

  1. Sam

    Sam Guest

    see code & error below.

    i noticed that the page parser only calles the set property so i decided
    to program it like below so that the set property can be called by the
    page parser while the get property is still availible for programming.

    Sam.
    -----------------------------------------------------------------------
    <PersistenceMode(PersistenceMode.InnerProperty)> _
    Public WriteOnly Property Element() As Element
    Set(ByVal element As Element)
    _elements.Add(element)
    End Set
    End Property

    <PersistenceMode(PersistenceMode.InnerProperty)> _
    Public ReadOnly Property element(ByVal i As integer) As Element
    Get
    Return _elements.Item(i)
    End Get
    End Property
    -----------------------------------------------------------------------

    Parser Error Message: Ambiguous match found.

    Source Error:


    Line 5: <mylib:myclass id="id" runat="server">
    Line 6: <Source>Sams Source</Source>
    Line 7: <Element label="Sams Label 1" />
    Line 8: <Element label="Sams Label 2" />
    Line 9: <Element label="Sams Label 3" />

    Source File: /WebSite2/Employees.aspx Line: 7
    -----------------------------------------------------------------------
    Sam, Jul 21, 2005
    #1
    1. Advertising

  2. Sam

    Dale Guest

    Look up Microsoft knowledge base article 823194 and read this article on
    creating custom collection classes. They solved the ambiguous match found
    error for me.

    HTH
    --
    Dale Preston
    MCAD C#
    MCSE, MCDBA


    "Sam" wrote:

    > see code & error below.
    >
    > i noticed that the page parser only calles the set property so i decided
    > to program it like below so that the set property can be called by the
    > page parser while the get property is still availible for programming.
    >
    > Sam.
    > -----------------------------------------------------------------------
    > <PersistenceMode(PersistenceMode.InnerProperty)> _
    > Public WriteOnly Property Element() As Element
    > Set(ByVal element As Element)
    > _elements.Add(element)
    > End Set
    > End Property
    >
    > <PersistenceMode(PersistenceMode.InnerProperty)> _
    > Public ReadOnly Property element(ByVal i As integer) As Element
    > Get
    > Return _elements.Item(i)
    > End Get
    > End Property
    > -----------------------------------------------------------------------
    >
    > Parser Error Message: Ambiguous match found.
    >
    > Source Error:
    >
    >
    > Line 5: <mylib:myclass id="id" runat="server">
    > Line 6: <Source>Sams Source</Source>
    > Line 7: <Element label="Sams Label 1" />
    > Line 8: <Element label="Sams Label 2" />
    > Line 9: <Element label="Sams Label 3" />
    >
    > Source File: /WebSite2/Employees.aspx Line: 7
    > -----------------------------------------------------------------------
    >
    Dale, Jul 26, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Denon
    Replies:
    2
    Views:
    4,373
    Yuke Liew
    Jan 2, 2004
  2. Ben

    Ambiguous match found.

    Ben, Apr 27, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    7,897
    bond007
    Mar 23, 2010
  3. =?Utf-8?B?QWxleGFuZHJl?=

    Error: Ambiguous match found.

    =?Utf-8?B?QWxleGFuZHJl?=, Apr 23, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    16,550
    OnPreInit
    Oct 1, 2009
  4. Francois
    Replies:
    3
    Views:
    654
    Hans Kesting
    May 22, 2007
  5. aparna

    Ambiguous match found

    aparna, Mar 25, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    423
    aparna
    Mar 26, 2008
Loading...

Share This Page