This documentation is archived and is not being maintained.

ParseChildrenAttribute Constructor (Boolean)

Initializes a new instance of the ParseChildrenAttribute class using the ChildrenAsProperties property to determine if the elements that are contained within a server control are parsed as properties of the server control.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public:
ParseChildrenAttribute(
	bool childrenAsProperties
)

Parameters

childrenAsProperties
Type: System::Boolean
true to parse the elements as properties of the server control; otherwise, false.

If childrenAsProperties is false, the elements that are contained within the server control are parsed as a control. false is the default for ParseChildrenAttribute.

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 for a custom server control named CollectionPropertyControl. When the ParseChildrenAttribute is declared before the class defining CollectionPropertyControl, the ParseChildrenAttribute sets the ChildrenAsProperties property to true.

No code example is currently available or this language may not be supported.

The following code example demonstrates how to use the CollectionPropertyControl and Employee classes in an ASP.NET page. One instance of the Employee class is added declaratively and another is added programmatically.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

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.
Show: