This documentation is archived and is not being maintained.

DataPagerFieldCollection Class

Represents a collection of DataPagerField objects that are used by the DataPager control.

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

[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class DataPagerFieldCollection : StateManagedCollection

You can use the DataPagerFieldCollection class to programmatically manage a set of DataPagerField objects. Note that it is more typical to define these fields declaratively instead of programmatically.

You can access the properties and methods of the DataPagerFieldCollection class through the DataPager.Fields property. You can add, insert, and remove DataPagerField objects by using the appropriate methods of the DataPagerFieldCollection class. To programmatically retrieve DataPagerField objects from a collection, do one of following:

The Count property gets the total number of items in the collection. It is typically used to determine the upper bound of the collection. You can add items and remove items in the collection by using the Add, Insert, Remove, and RemoveAt methods.

System.Object
  System.Web.UI.StateManagedCollection
    System.Web.UI.WebControls.DataPagerFieldCollection

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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.

.NET Framework

Supported in: 3.5
Show: