SQL Server paging stored procedure generator

Name: (Name of the stored procedure)

Database table Name:

Identity field:

Sord field:
Sort direction:
Fields list:Fields list in select clause, separated by ",", use "*" for all fields

Where clause(optional):
SQL Server version:
Paging parameters:
*Note:Required fields

This utility is used to generate the paging stored procedure for SQL Server database that can be used along with the AspNetPager and MvcPager controls. It supports single table only, modifies code accordingly if you need to join multiple tables.

Paging parameters refers to the parameters passed to the stored procedure, they are mapped to the following properties of the AspNetPager and MvcPager controls:

Parameter mappings for the AspNetPager control:

Parameter NameProperty Name
PageIndexCurrentPageIndex
PageSizePageSize
StartRecordIndexStartRecordIndex
EndRecordIndexEndRecordIndex
Parameter mappings for the MvcPager control:
Parameter Name Property Name
PageIndexIPagedList.CurrentPageIndex
PageSizeIPagedList.PageSize
StartRecordIndexPagedList.StartItemIndex
EndRecordIndexPagedList.EndItemIndex