![]() |
|
|
|
#1 |
|
Hi,
I m getting an Error that is my custom DropDownList server control does not allow child controls. I've created a custom DropDownList in ASP.Net 2.0 While using this control in my project I m getting this error.Please help me. Shakila ShakilaRahmanLaboni |
|
|
|
|
|
|
#2 |
|
Super Moderator
|
Hey,
it would probably be best answered on a ASP.Net forum. unholy |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2007
Posts: 1
|
If you inherit from a drop down list you will by default have an empty child controls collection. For some reason dropdown lists do not allow child controls.
To overcome this you need to override the CreateControlCollection method. protected override ControlCollection CreateControlCollection() { return new ControlCollection(this); } cavalier |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamically added TreeNode Control not render my custom attribute | venkyzealous | Software | 0 | 05-10-2008 03:46 PM |
| Custom control dropdownlist - need advice | tcstom | Software | 0 | 04-18-2008 11:28 AM |
| Mind Control and CIA'S BOURNE IDENTITY PLOT | soleilmavis@gmail.com | DVD Video | 2 | 08-03-2007 09:54 PM |
| Ajax Atlas not working in User Control | faiq | Software | 0 | 09-16-2006 08:28 AM |
| FS: JP1 cable to program your universial remote control, now youcan control anything you want! | Mike | DVD Video | 0 | 07-15-2005 02:46 AM |