Groups | Blog | Home
all groups > asp.net building controls > july 2005 >

asp.net building controls : ambiguous match found


Sam
7/21/2005 12:00:00 AM
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
intrader
7/21/2005 12:00:00 AM
[quoted text, click to view]
Dale
7/25/2005 5:38:03 PM
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


[quoted text, click to view]
AddThis Social Bookmark Button