The problem is, LiteralControl inherits from a class that has a Controls
property - so LiteralControl inherits it as well.
Container controls such as a Panel, PlaceHolder, and others have a Controls
collection you an manipulate.
Controls such as TextBox, Button, etc don't - and this just makes sense. A
button cannot have any controls within it - it is a button!
You just have to think about whether or not it really makes sense for a
control to have child controls.
"poi" <dd*****@rucs.nul> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
In VS.NET 2003, I get intellisense if I do this:
LiteralControl literalControl = new LiteralControl();
literalControl.ID = "something";
literalControl.Controls.Add.....
And it compiles fine but I get an error saying that the LiteralControl
does not allow child controls.
So which controls *do* allow children, since VS.NET is not helping me?
Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!