Custom DropDownList control in ASP.NET 2.0
- From: "Steve" <stephenc@xxxxxxxxxxxxx>
- Date: 1 Mar 2006 16:42:11 -0800
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!
.
- Prev by Date: Re: Where Is MenuItem.Visible?
- Next by Date: Re: Total newbie - form redirect using runat="server" - please help
- Previous by thread: ASP.NET 2.0 Exceptions
- Next by thread: Need help with datalist and repeater
- Index(es):
Relevant Pages
|