Custom DropDownList Control and ListItem

V

Vi

Hi,
I'm trying to create a custom DropDownList Control. Everything seems to be
OK until I'm adding ListItem-s to the control. I'm getting the error: " Could
not load type ControlLib.ListItem from assembly ControlLib" (ControlLib is
the project where the custom DropDown control is defined).
Here's the code:

<lib:CustomDropDownList id="list1" runat="server" BackColorOn="128, 255, 128">
<lib:ListItem Value="0" Selected="True">-- Select --</lib:ListItem>
<lib:ListItem Value="1">Value 1</lib:ListItem>
<lib:ListItem Value="2">Value 2</lib:ListItem>
<lib:ListItem Value="3">Value 3</lib:ListItem>
</lib:CustomDropDownList>

I guess I have to define ListItem in ControlLib as well, but not sure how.
Thank you in advance
 
A

Abraham Luna

can you just add the asp:listitem instead
or do you have a custom listitem?
 
V

Vi

I can - I tried and it worked.
I thought it does not work because if I use "asp:ListItem", VS.NET 2003
underlines asp:ListItem with the error message "The active schema does not
support the element 'asp:ListItem'".
But I tried it anyway and it worked.
Thanks
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top