标签:style blog http io os 使用 ar for sp
git:@{ ViewBag.Title = "Processes Listing"; } @using PagedList.Mvc; @using PagedList; <link href="/Content/PagedList.css" rel="stylesheet" type="text/css" /> <h2>List of Processes</h2> <ul> @foreach(var process in ViewBag.Processes){ <li>@process.ProcessName</li> } </ul> @Html.PagedListPager((IPagedList)ViewBag.Processes, page => Url.Action("Index", new { page }))
public object Index(int? page) { var processes = System.Diagnostics.Process.GetProcesses(); var pageNumber = page ?? 1; var onePageOfProcesses = processes.ToPagedList(pageNumber, 25); ViewBag.Processes = onePageOfProcesses; return View(); }
4. 运行
标签:style blog http io os 使用 ar for sp
原文地址:http://blog.csdn.net/lan_liang/article/details/40018709