public ActionResult Index(int pageid = 1) { int skip = (pageid - 1) * 8; int Count = pageRepository.PageCounts(); ViewBag.PageID = pageid; ViewBag.PageCount = Count / 8; var list = pageRepository.BlogPagging().Skip(skip).Take(8).ToList(); return(View(list)); }