This documentation is archived and is not being maintained.

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)

public bool AutoPage { get; set; }
<asp:LinqDataSource AutoPage="True|False" />

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.


.NET Framework

Supported in: 4, 3.5

Windows 7, Windows Vista SP1 or later, Windows XP SP3, 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.