I figured it out. I should declare my user control as
<ParseChildren(False)> _
Public Class DataEntryPage
....
End Class
The parameter of ParseChildren attribute controls whether child controls
should be treated as properties, or as child controls. Thanks for pointing
out a direction.
Regards,
Dmitriy.
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You would have to develop a Templated Control to use in that manner.
Otherwise, add the Button to its Controls programmatically.
--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Dmitriy Zakharov" <dm********@yahoo.com> wrote in message
news:uS**************@TK2MSFTNGP09.phx.gbl... Hi,
I'm trying to create a control that contains other controls. But the
problem is that child controls are treated as properties, and page could not be
parsed.
Parser Error Message: Type 'DataEntryPage' does not have a property
named 'asp:Button'.
Source Error:
Line 46: <my:dataentrypage id="pgMissingCoverages"
runat="server">
Line 47: <asp:Button ID="fdfs" Text="dsasda"
Runat="server" />
Line 48: </my:dataentrypage>
Is there a way to get child controls into Controls collection instead of
properties?
Thanks in advance.
Dmitriy.