LinqDataSourceSelectEventArgs.Arguments Property

 

Gets values that determine how the data is returned.

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

public DataSourceSelectArguments Arguments { get; }

Property Value

Type: System.Web.UI.DataSourceSelectArguments

An object that contains values for determining how the data is returned.

A data-bound control passes properties to the LinqDataSource control through the Arguments property in order to specify how paging and sorting should occur. If the AutoPage property or the AutoSort property is set to true, the LinqDataSource control automatically sorts or pages based on the properties from the data-bound control.

You can customize how the data is sorted and paged from a query by setting the AutoPage and AutoSort properties to false and then creating a handler for the Selecting event. In the event handler, use the Arguments property to retrieve the sorting and paging properties from the data-bound control. Then customize the query as needed, based on the properties from the Arguments property. If the RetrieveTotalRowCount property of the DataSourceSelectArguments object is set to true, you must return a value for the TotalRowCount property.

.NET Framework
Available since 3.5
Return to top
Show: