Ejemplo n.º 1
0
        public ActionResult Search(string keyword)
        {
            string r = "No Results Found";

            SearchManager searcher = new SearchManager();
            int total = 0;
            List<SearchObject> results = searcher.DoSearchForAllStores(keyword.Trim(), 1, 100, ref total);

            if (results != null)
            {
                r = "Found " + total.ToString() + " matches";
                r += "<ul>";

                foreach (SearchObject obj in results)
                {
                    r += "<li>";
                    r += obj.Title;
                    r += "</li>";
                }
                r += "</ul>";
            }

            TempData["results"] = r;
            return View();
        }