Represents an automatically generated field in a data-bound control. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)] [AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)] public ref class AutoGeneratedField sealed : public BoundField
The class is used to represent an automatically generated field in a data-bound control, such as GridView or DetailsView. Automatically generated fields are created by a data-bound control when the appropriate property is set to true (for example, the AutoGenerateColumns property for the GridView control, the AutoGenerateRows property for the DetailsView control, and so on).
Automatically generated fields are not added to the field collection of a data-bound control (for example, the Columns collection for the GridView control, the Fields collection for the DetailsView control, and so on).
The class is intended for use internally by data-bound controls. Unlike other data fields (such as BoundField, CheckBoxField, TemplateField, and so on), the class cannot be placed declaratively on a page as part of a field collection. Although you can programmatically add an object to a field collection, this design pattern should be avoided.
Because automatically generated fields represent the automatic rendering of a field, data-bound controls do not typically allow users to modify the properties of the objects. If the automatic rendering is not suitable for your needs, define your own data fields for the field collection of the control.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.