Custom DropDownList control in ASP.NET 2.0

S

Steve

Hi

I've created a custom dropdown list in a web control library that my
aspx page uses as follows:

<%@ Register Assembly="CommonUI" Namespace="POLISY.Web.UI.Common"
TagPrefix="cc1" %>
....
<cc1:WFEDropDownList ID="WFEDropDownList1" runat="server">
<asp:ListItem Value="A">Apple</asp:ListItem>
<asp:ListItem Value="B">Banana</asp:ListItem>
</cc1:WFEDropDownList></td>

When I compile the .aspx I get the following error for each
<asp:ListItem> within a <cc1:WFEDropDownList> element:

Element 'ListItem' is not a known element. This can occur if there
is a compilation error in the Web site.

Any idea what's causing this? The code for WFEDropDownList is very
simple. All it does is extend DropDownList as follows:


using System.Web.UI;
using System.Web.UI.WebControls;
namespace POLISY.Web.UI.Common
{
[ToolboxData("<{0}:WFEDropDownList
runat=server></{0}:WFEDropDownList>")]
public class WFEDropDownList : DropDownList
{
// TO DO: Register javascript to display a tool tip for the
// currently selected item in the drop down. (needed in case
// of truncation)

}
}


Thanks for your help!
 

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,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top