public ActionResult Explore(string type) { try { ApplicationDAO dao = new ApplicationDAO(); CartDAO cdao = new CartDAO(); if (Session["Id"] != null) { ViewBag.Cart = cdao.SearchCartUser(int.Parse(Session["Id"].ToString())); } if (type.Equals("Featured")) { ViewBag.Apps = dao.GetTopApps(); } else if (type.Equals("Explore")) { ViewBag.Apps = dao.List(); } else if (type.Equals("Free")) { ViewBag.Apps = dao.GetFreeApps(); } else { return(RedirectToAction("Index", "Home")); } return(View("Search")); } catch { return(RedirectToAction("Index", "Home")); } }