Click here to Skip to main content
16,020,741 members
Articles / Web Development / ASP.NET

Does Not Allow Child Controls Error

Rate me:
Please Sign up or sign in to vote.
3.31/5 (13 votes)
16 Aug 2007CPOL1 min read 42K   207   16  
When you create a custom drop-down-list that inherits from System.Web.UI.WebControls.DropDownList and when you try to add controls (e.g., Me.Controls.Add(myControl)), you will get a "does not allow child controls error". Here is the fix.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Australia Australia
My name is Tommy Segoro currently working with Vivid Group in Perth, Western Australia. I also run my own hosting, web site design and development freelancing company. If you want to contact me please visit my website http://www.smallbusinesshosting.com.au.

I've been involved a lot with the customisation of Microsoft technologies such as Windows Sharepoint Services 2.0-3.0, Sharepoint Portal 2003, Microsoft Office Sharepoint Server 2007 (MOSS), Microsoft CRM and Microsoft Content Management Server (MCMS).

I currently hold Microsoft Certified Professional (MCP) and MS CRM Software Advisor certification and have been programming for almost 4 years now.

Comments and Discussions