Пример #1
0
        public ActionResult Search(int?page, string Name)
        {
            List <Book> a = BookAction.SearchBook(Name);

            ViewBag.l = a;
            return(View());
        }
        public ActionResult Search(int?page, string Name)
        {
            int         pageSize   = 3;
            int         pageNumber = (page ?? 1);
            List <Book> a          = BookAction.SearchBook(Name);

            return(View(a.OrderBy(m => m.ID).ToPagedList(pageNumber, pageSize)));
        }
 public ActionResult ListBook(string SearchString)
 {
     ViewBag.ListBook = BookAction.SearchBook(SearchString);
     return(View());
 }