|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Custom control with ListBoxsome 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? 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? > > > 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? > > > > > > 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? > > > > > > > > > > > >
Save Child GridView only when parent GridView Saved
fill ObjectDatasource on request Selecting a value from a Gridview Control HyoerLink - need 2 params Select text in asp:textbox Auto postback in dropdownlist Failed to load viewstate. Getting error BC30560 with CR 11 Release 2 WebParts - can you transfer one users choice to all users? please help me with a dropdownlist selectindexchange event into a custom control |
|||||||||||||||||||||||