Export (0) Print
Expand All

DataPager::PagedControlID Property

Gets or sets the ID of the control that contains the data that will be paged by the DataPager control.

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

[ThemeableAttribute(false)]
public:
virtual property String^ PagedControlID {
	String^ get ();
	void set (String^ value);
}
<asp:DataPager PagedControlID="String" />

Property Value

Type: System::String
The ID of the control that contains the data that will be paged by the DataPager control. The default is an empty string, which indicates that this property is not set.

Use the PagedControlID property to specify the ID of the control that contains the data that will be paged by the DataPager control. The specified control must implement the IPageableItemContainer interface and must use the same naming container as the DataPager control. An example of a control that you can specify is the ListView control.

If this property is an empty string or nullptr, the DataPager control checks whether its container control implements the IPageableItemContainer interface. For example, in the ListView control, the PagedControlID property does not have to be set if you put the DataPager control inside the ListView::LayoutTemplate template. This is because the DataPager control can automatically find the ListView control by examining the control tree.

The value of this property is stored in view state.

The following example shows how to use the PagedControlID property to dynamically associate a ListView control with a DataPager control. This code example is part of a larger example provided for the DataPager constructor.

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

The following example shows how to declaratively set the PagedControlID property in a DataPager control in order to page the data of a ListView control.

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

.NET Framework

Supported in: 4.5, 4, 3.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft