Adding child elements to custom DropDownList

G

Guest

Hi,

I have a custom control inherited from DropDownList. In Visual Studio, I
can access my added properties using Intellisense just fine...

<ctl:MyDropDown id="ctl1" runat="server" CurrentColor="..." />

However, I cannot add ListItems to it. How can I code my control, so I can
do something like this?

<ctl:MyDropDown id="ctl1" runat="server" CurrentColor="...">
<asp:ListItem Text="..." Value="..." />
<asp:ListItem Text="..." Value="..." />
<asp:ListItem Text="..." Value="..." />
</ctl:MyDropDown>

Thank you,

newGuy
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top