Exemple #1
0
        // GET: Search


        public ActionResult SearchResult(string keyword)
        {
            int page = BookDao.GetNumberPage(keyword);
            int id   = Convert.ToInt32(Request.QueryString["i"]);

            if (id <= 0)
            {
                id = 1;
            }
            List <Book> books = BookDao.GetPaging(id, keyword);

            ViewBag.books      = books;
            ViewBag.NumberPage = page;
            return(View());
        }