Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Arthur Dent #1
Inherited DropDownList and asp:listitems
Hi all,
I have a control which i wrote which inherits the asp:dropdownlist control.
Works great, all happy.
If when using it i try to declaratively add some items, it complains that
they are unknown types. eg...
<mytag:mydropdownlist id="lstInherited" runat="server"
appenddatabounditems="true" >
<asp:listitem id="" value="select an item" >
</mytag:mydropdownlist>
It complains that asp:listitem is an unknown element. How can i direct the
runtime that my dropdownlist
control can contain asp:listitems like its base class? I assume some sort of
attribute on the class, but i am
looking for any direction as to what attribute.
Thanks in advance,
- Arthur Dent.
Arthur Dent Guest
-
Exposing ListItems in Composite Control
I'm trying to build a composite control that consists of a select inside a div (a listbox inside a panel). My problem is that when I compile the... -
#25908 [Bgs]: Inherited class properties aren't inherited until after class is parsed [?]
ID: 25908 Updated by: helly@php.net Reported By: kyle at putnamcabinets dot com Status: Bogus Bug Type: ... -
#25908 [Opn->Bgs]: Inherited class properties aren't inherited until after class is parsed [?]
ID: 25908 Updated by: helly@php.net Reported By: kyle at putnamcabinets dot com -Status: Open +Status: ... -
#25908 [Opn]: Inherited class properties aren't inherited until after class is parsed [?]
ID: 25908 User updated by: kyle at putnamcabinets dot com -Summary: Class properties are added automatically (at compile... -
Inherited DropDownList Designer problem
I have an inherited DropDownList custom control that in the DataBind() method I add a bunch pre determined list items that contain the various... -
Gaurav Vaish \(www.EduJini.IN\) #2
Re: Inherited DropDownList and asp:listitems
Look into the following attribtue:
ParseChildrenAttribute (System.Web.UI)
PersistChildrenAttribute (System.Web.UI)
The child controls, by default, are not accepted.
You may also need to override AddedParsedSubObject method for type-safety of
the controls added.
--
Happy Hacking,
Gaurav Vaish | [url]http://www.mastergaurav.org[/url]
[url]http://www.edujini.in[/url] | [url]http://webservices.edujini.in[/url]
-------------------
"Arthur Dent" <hitchhikersguideto-news@yahoo.com> wrote in message
news:%23aKId1JwGHA.4920@TK2MSFTNGP06.phx.gbl...> Hi all,
>
> I have a control which i wrote which inherits the asp:dropdownlist
> control. Works great, all happy.
> If when using it i try to declaratively add some items, it complains that
> they are unknown types. eg...
>
> <mytag:mydropdownlist id="lstInherited" runat="server"
> appenddatabounditems="true" >
> <asp:listitem id="" value="select an item" >
> </mytag:mydropdownlist>
>
> It complains that asp:listitem is an unknown element. How can i direct the
> runtime that my dropdownlist
> control can contain asp:listitems like its base class? I assume some sort
> of attribute on the class, but i am
> looking for any direction as to what attribute.
> Thanks in advance,
> - Arthur Dent.
>
Gaurav Vaish \(www.EduJini.IN\) Guest
-
Arthur Dent #3
Re: Inherited DropDownList and asp:listitems
Thanks for the tips....
I will check out those attribs/methods.
Cheers!
"Gaurav Vaish (www.EduJini.IN)" <gaurav.vaish.nospam@nospam.gmail.com> wrote
in message news:uDF10bNwGHA.4416@TK2MSFTNGP03.phx.gbl...> Look into the following attribtue:
> ParseChildrenAttribute (System.Web.UI)
> PersistChildrenAttribute (System.Web.UI)
>
> The child controls, by default, are not accepted.
> You may also need to override AddedParsedSubObject method for type-safety
> of the controls added.
>
> --
> Happy Hacking,
> Gaurav Vaish | [url]http://www.mastergaurav.org[/url]
> [url]http://www.edujini.in[/url] | [url]http://webservices.edujini.in[/url]
> -------------------
>
>
> "Arthur Dent" <hitchhikersguideto-news@yahoo.com> wrote in message
> news:%23aKId1JwGHA.4920@TK2MSFTNGP06.phx.gbl...>>> Hi all,
>>
>> I have a control which i wrote which inherits the asp:dropdownlist
>> control. Works great, all happy.
>> If when using it i try to declaratively add some items, it complains that
>> they are unknown types. eg...
>>
>> <mytag:mydropdownlist id="lstInherited" runat="server"
>> appenddatabounditems="true" >
>> <asp:listitem id="" value="select an item" >
>> </mytag:mydropdownlist>
>>
>> It complains that asp:listitem is an unknown element. How can i direct
>> the runtime that my dropdownlist
>> control can contain asp:listitems like its base class? I assume some sort
>> of attribute on the class, but i am
>> looking for any direction as to what attribute.
>> Thanks in advance,
>> - Arthur Dent.
>>
>
Arthur Dent Guest



Reply With Quote

