/// <summary> /// Pager Helper Extensions /// </summary> /// <param name="htmlHelper"></param> /// <param name="currentPage">当前页码</param> /// <param name="pageSize">页面显示的数据条目</param> /// <param name="totalCount">总记录数</param> /// <returns></returns> public static string Pager(this HtmlHelper htmlHelper, int currentPage, int pageSize, int totalCount) { RenderPager pager = new RenderPager(htmlHelper.ViewContext, currentPage, pageSize, totalCount, defaultDisplayCount); string pagerString = pager.RenderHtml(); return(pagerString); }
public static string Pager(this HtmlHelper htmlHelper, int currentPage, int pageSize, int totalCount, int toDisplayCount, string formId) { RenderPager pager = new RenderPager(htmlHelper.ViewContext, currentPage, pageSize, totalCount, toDisplayCount, formId); return(pager.RenderHtml()); }