Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 06-27-2006, 08:01 AM   #1
Default Getting error in Custom control


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
ShakilaRahmanLaboni is offline   Reply With Quote
Old 06-27-2006, 09:07 AM   #2
unholy
Super Moderator
 
Join Date: Jun 2005
Location: Australia
Posts: 3,988
Send a message via MSN to unholy
Default
Hey,

it would probably be best answered on a ASP.Net forum.


unholy
unholy is offline   Reply With Quote
Old 08-01-2007, 02:38 PM   #3
cavalier
Junior Member
 
Join Date: Aug 2007
Posts: 1
Default Dropdown list child controls
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
cavalier is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46