ParseChildrenAttribute Constructor (Boolean, String)
Initializes a new instance of the ParseChildrenAttribute class using the childrenAsProperties and defaultProperty parameters.
Assembly: System.Web (in System.Web.dll)
Parameters
- childrenAsProperties
- Type: System::Boolean
true to parse the elements as properties of the server control; otherwise, false.
- defaultProperty
- Type: System::String
A string that defines a collection property of the server control into which nested content is parsed by default.
The code example in this section contains two parts. The first code example demonstrates how to set properties for the ParseChildrenAttribute class. The second code example demonstrates how to use classes in an ASP.NET page.
The following code example demonstrates how to set the ParseChildrenAttribute object of a custom server control named CollectionPropertyControl. The ParseChildrenAttribute sets the ChildrenAsProperties property to true and the DefaultProperty property to the Employee class.
The following code example demonstrates how to use the CollectionPropertyControl and Employee classes in an ASP.NET page.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.