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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top