AutoPage Property

LinqDataSource::AutoPage Property


Gets or sets a value that indicates whether the LinqDataSource control supports navigation through sections of the data at run time.

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

property bool AutoPage {
	bool get();
	void set(bool value);

Property Value

Type: System::Boolean

true if the user can page through the data; otherwise, false. The default value is true.

Set the AutoPage property to true to enable paging in the LinqDataSource control. To enable the user to page through the data, connect a data-bound control that provides the interface for paging to the LinqDataSource control. When the AutoPage property is set to true, the LinqDataSource control retrieves only enough records for one page in the data-bound control. It uses the Skip<TSource> and Take<TSource> methods to retrieve the records for the current page.

The following example shows a LinqDataSource control with the AutoPage property set to true and a GridView control that is bound to the LinqDataSource control. The AllowPaging property of the GridView control is set to true to provide the interface that lets users page through the data.

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

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft