ObjectDataSource::MaximumRowsParameterName Property
Gets or sets the name of the business object data retrieval method parameter that is used to indicate the number of records to retrieve for data source paging support.
Assembly: System.Web (in System.Web.dll)
public: property String^ MaximumRowsParameterName { String^ get (); void set (String^ value); }
<asp:ObjectDataSource MaximumRowsParameterName="String" />
Property Value
Type: System::StringThe name of the SelectMethod parameter that is used to indicate the number of records to retrieve. The default is "maximumRows".
The MaximumRowsParameterName property is used to support data source paging. For information about how paging is supported by the ObjectDataSource control, see EnablePaging.
The MaximumRowsParameterName property delegates to the MaximumRowsParameterName property of the ObjectDataSourceView object that is associated with the ObjectDataSource control.
The following three examples show a Web page, a code-behind page class, and a data-access class that enable the user to pick how many records are displayed in the page.
The Web page contains an ObjectDataSource control whose EnablePaging property is set to true. The SelectCountMethod property is set to the name of a method that returns the total number of records in the query. The MaximumRowsParameterName property and the StartRowIndexParameterName property are set to the names of the parameters that are used in the Select method. The page also contains a DropDownList control.
The second example shows a handler for the ListControl::SelectedIndexChanged event of the DropDownList control. The code in the handler sets the PageSize property to the user's selection.
The third example shows the data access class that retrieves data from the Customers table. It includes a method named GetSubsetOfEmployees, which is assigned to the SelectMethod property of the ObjectDataSource control. The example also includes a method named GetEmployeeCount, which is assigned to the SelectCountMethod property of the ObjectDataSource control. The class uses LINQ to query the Customers table. The example requires a LINQ to SQL class that represents the Northwind database and Customers table. For more information, see How to: Create LINQ to SQL Classes in a Web Project.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
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.