Пример #1
0
        public ActionResult Search(string productName)
        {
            IList <Product> products = ProductAPIController.GetProductByName(productName);

            ViewBag.ProductList = products;
            ViewBag.Size        = products.Count;
            return(View());
        }
Пример #2
0
        public ActionResult Result()
        {
            string key = Request.QueryString["txtName"];
            if (key!= null)
            {
                ViewBag.ProductList = ProductAPIController.GetProductByName(key);
                ViewBag.Size = ViewBag.ProductList.Count;

            }
        
            return View();