FormView::CreateChildControls Method (IEnumerable, Boolean)
Creates the control hierarchy used to render the FormView control with the specified data source.
Assembly: System.Web (in System.Web.dll)
protected: virtual int CreateChildControls( IEnumerable^ dataSource, bool dataBinding ) override
Parameters
- dataSource
- Type: System.Collections::IEnumerable
An IEnumerable that represents the data source used to create the control hierarchy.
- dataBinding
- Type: System::Boolean
true to indicate that the control hierarchy is created directly from the data source; false to indicate the control hierarchy is created from the view state.
| Exception | Condition |
|---|---|
| HttpException | The DataSourceView of the IDataSource to which the FormView control is bound is nullptr. |
The CreateChildControls(IEnumerable, Boolean) method is a helper method called by the FormView control to create the control hierarchy for the FormView control. When the dataBinding parameter is true, data binding is performed before the control hierarchy is created.
Notes to InheritorsWhen extending the FormView class, you can override this method to create your own control hierarchy.
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.