62,244
社区成员




<!--分页控件 -->
<%=Html.AjaxPager(Model, new PagerOptions() { PageIndexParameterName = "intPage", ShowPageIndexBox = false, ShowGoButton = false, CurrentPagerItemWrapperFormatString = "<span class=\"cpb\">{0}</span>", NumericPagerItemWrapperFormatString = "<span class=\"item\">{0}</span>", CssClass = "pages", SeparatorHtml = "" }, new AjaxOptions() { UpdateTargetId = "dvCustomers" })%>
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "lib", action = "index", id = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute(
"Paging", // Route name
"{controller}/{action}/{id}/page{pageIndex}",
new {id=0, pageIndex = 1 }
);
}
2.
public ActionResult SimpleShow(string id,int pageIndex=1)
加一个参数 pageIndex
pageIndex就可以获取分页传进来的 页数
如果你问的不是这个,就去问webdiyer吧