Model
class PageModel
{
    public int PageIndex {get;sets;}
    public string PageName {get; set;}
}

Controller
ViewBag.Next = pageIndex + 1;//下一页
ViewBag.Prev = pageIndex - 1;//上一页

//pageCount 为 总页数

List<PageModel> list = new List<PageModel>();

for(i=0;i<dt.Rows.Count;i++)
{
    list.Add(new PageModel{PageIndex=i,PageName=dr.Rows['GameAreaName'].tostring()});
}

ViewBag.PageIndexs = new SelectList(list, "PageIndex", "PageName");

View
@Html.DropDownList("PageIndex", ViewBag.PageIndexs as SelectList)
站内公告

A PHP Error was encountered

Severity: Core Warning

Message: PHP Startup: zip: Unable to initialize module Module compiled with module API=20060613 PHP compiled with module API=20090626 These options need to match

Filename: Unknown

Line Number: 0

Backtrace: