Home All Groups Group Topic Archive Search About
Author
7 Sep 2006 11:33 AM
kurt sune
I am trying to do a custom control wich extends the ordinary listbox with
some features.
The class is declared thus:
ParseChildren(True), _

ToolboxBitmap(GetType(ListBox)), _

DefaultEvent("SelectedIndexChanged")> _

Public Class eListBox

Inherits System.Web.UI.WebControls.ListBox



In the assembly info I say:

<Assembly: TagPrefix("CustomControlLibrary", "mir")>



When I in the IDE add items  via ListItem Collection Editor

The resulting errormessage in the control in the ide: Rendering of the
control fails in the IDE.

The HTML looks like this:

<mir:eListBox ID="EListBox1" runat="server">

<asp:ListItem>one</asp:ListItem>

<asp:ListItem>two</asp:ListItem>

</mir:eListBox>

And the  errormessage in erorlist is:

Error 4 Type 'CustomControlLibrary.eListBox' does not have a public property
named 'ListItem'. C:\Inetpub\wwwroot\CCLtest\eListBox.aspx 18

Error 5 Element 'ListItem' is not a known element. This can occur if there
is a compilation error in the Web site.
C:\Inetpub\wwwroot\CCLtest\eListBox.aspx 18 18 C:\...\CCLtest\




Anybody any ideas?

Author
24 Sep 2006 9:43 PM
Steve
I am having the exact same problem with a control derived from DropDownList. 
Additionally, I've noticed that Intellisense does not work between the main
tags of the control.

Any luck on finding an answer?

Steve

Show quoteHide quote
"kurt sune" wrote:

> I am trying to do a custom control wich extends the ordinary listbox with
> some features.
> The class is declared thus:
> ParseChildren(True), _
>
> ToolboxBitmap(GetType(ListBox)), _
>
> DefaultEvent("SelectedIndexChanged")> _
>
> Public Class eListBox
>
> Inherits System.Web.UI.WebControls.ListBox
>
>
>
> In the assembly info I say:
>
> <Assembly: TagPrefix("CustomControlLibrary", "mir")>
>
>
>
> When I in the IDE add items  via ListItem Collection Editor
>
> The resulting errormessage in the control in the ide: Rendering of the
> control fails in the IDE.
>
> The HTML looks like this:
>
> <mir:eListBox ID="EListBox1" runat="server">
>
> <asp:ListItem>one</asp:ListItem>
>
> <asp:ListItem>two</asp:ListItem>
>
> </mir:eListBox>
>
> And the  errormessage in erorlist is:
>
> Error 4 Type 'CustomControlLibrary.eListBox' does not have a public property
> named 'ListItem'. C:\Inetpub\wwwroot\CCLtest\eListBox.aspx 18
>
> Error 5 Element 'ListItem' is not a known element. This can occur if there
> is a compilation error in the Web site.
> C:\Inetpub\wwwroot\CCLtest\eListBox.aspx 18 18 C:\...\CCLtest\
>
>
>
>
> Anybody any ideas?
>
>
>
Author
3 Oct 2006 9:29 AM
kurt sune
no luck at all

see also
http://forums.asp.net/thread/1393172.aspx




Show quoteHide quote
"Steve" <St***@discussions.microsoft.com> wrote in message
news:86FE0042-BE61-4AA9-942A-6759C1A2D90B@microsoft.com...
> I am having the exact same problem with a control derived from
DropDownList.
> Additionally, I've noticed that Intellisense does not work between the
main
> tags of the control.
>
> Any luck on finding an answer?
>
> Steve
>
> "kurt sune" wrote:
>
> > I am trying to do a custom control wich extends the ordinary listbox
with
> > some features.
> > The class is declared thus:
> > ParseChildren(True), _
> >
> > ToolboxBitmap(GetType(ListBox)), _
> >
> > DefaultEvent("SelectedIndexChanged")> _
> >
> > Public Class eListBox
> >
> > Inherits System.Web.UI.WebControls.ListBox
> >
> >
> >
> > In the assembly info I say:
> >
> > <Assembly: TagPrefix("CustomControlLibrary", "mir")>
> >
> >
> >
> > When I in the IDE add items  via ListItem Collection Editor
> >
> > The resulting errormessage in the control in the ide: Rendering of the
> > control fails in the IDE.
> >
> > The HTML looks like this:
> >
> > <mir:eListBox ID="EListBox1" runat="server">
> >
> > <asp:ListItem>one</asp:ListItem>
> >
> > <asp:ListItem>two</asp:ListItem>
> >
> > </mir:eListBox>
> >
> > And the  errormessage in erorlist is:
> >
> > Error 4 Type 'CustomControlLibrary.eListBox' does not have a public
property
> > named 'ListItem'. C:\Inetpub\wwwroot\CCLtest\eListBox.aspx 18
> >
> > Error 5 Element 'ListItem' is not a known element. This can occur if
there
> > is a compilation error in the Web site.
> > C:\Inetpub\wwwroot\CCLtest\eListBox.aspx 18 18 C:\...\CCLtest\
> >
> >
> >
> >
> > Anybody any ideas?
> >
> >
> >
Author
12 Oct 2006 3:58 PM
Steve
I have noticed that if do this...
<Items>
  <asp:ListItem />
<asp:ListItem />
</Items>

the element not found error goes away.  Intellisense still does not work.

Show quoteHide quote
"kurt sune" wrote:

> no luck at all
>
> see also
> http://forums.asp.net/thread/1393172.aspx
>
>
>
>
> "Steve" <St***@discussions.microsoft.com> wrote in message
> news:86FE0042-BE61-4AA9-942A-6759C1A2D90B@microsoft.com...
> > I am having the exact same problem with a control derived from
> DropDownList.
> > Additionally, I've noticed that Intellisense does not work between the
> main
> > tags of the control.
> >
> > Any luck on finding an answer?
> >
> > Steve
> >
> > "kurt sune" wrote:
> >
> > > I am trying to do a custom control wich extends the ordinary listbox
> with
> > > some features.
> > > The class is declared thus:
> > > ParseChildren(True), _
> > >
> > > ToolboxBitmap(GetType(ListBox)), _
> > >
> > > DefaultEvent("SelectedIndexChanged")> _
> > >
> > > Public Class eListBox
> > >
> > > Inherits System.Web.UI.WebControls.ListBox
> > >
> > >
> > >
> > > In the assembly info I say:
> > >
> > > <Assembly: TagPrefix("CustomControlLibrary", "mir")>
> > >
> > >
> > >
> > > When I in the IDE add items  via ListItem Collection Editor
> > >
> > > The resulting errormessage in the control in the ide: Rendering of the
> > > control fails in the IDE.
> > >
> > > The HTML looks like this:
> > >
> > > <mir:eListBox ID="EListBox1" runat="server">
> > >
> > > <asp:ListItem>one</asp:ListItem>
> > >
> > > <asp:ListItem>two</asp:ListItem>
> > >
> > > </mir:eListBox>
> > >
> > > And the  errormessage in erorlist is:
> > >
> > > Error 4 Type 'CustomControlLibrary.eListBox' does not have a public
> property
> > > named 'ListItem'. C:\Inetpub\wwwroot\CCLtest\eListBox.aspx 18
> > >
> > > Error 5 Element 'ListItem' is not a known element. This can occur if
> there
> > > is a compilation error in the Web site.
> > > C:\Inetpub\wwwroot\CCLtest\eListBox.aspx 18 18 C:\...\CCLtest\
> > >
> > >
> > >
> > >
> > > Anybody any ideas?
> > >
> > >
> > >
>
>
>