存储过程带返回值
SqlParameter[] sp ={new SqlParameter("@pageIndex",1)
,new SqlParameter("@pageSize",10)
,new SqlParameter("@rowCount",0){Direction=ParameterDirection.Output}
,new SqlParameter("@pageCount",0){Direction=ParameterDirection.Output}
,new SqlParameter("@where","")};
DataTable dt = DAL.SqlHelper.GetDataTable(System.Data.CommandType.StoredProcedure, "T_GetPagedData", sp);
string rowCount = sp[2].Value.ToString();
string pageCount = sp[3].Value.ToString();
Response.Write("总行数=" + rowCount + "总页数=" + pageCount);