alter procedure sp_aspnetpage
@curpage int
@tablename varchar(
@count int output
@order varchar(
@key varchar(
@pagesize int=
@condition varchar(
as
begin
set nocount on
declare @start_row_num int
set @start_row_num=(@curpage
declare @sql varchar(
set @sql=
declare @countnum nvarchar(
set @countnum=
exec sp_executesql @countnum
print @sql
exec (@sql)
end
From:http://tw.wingwit.com/Article/program/net/201311/13386.html