public ActionResult VendorList(FormCollection collection) { if (CheckAccess()) { TempData["searchkey"] = collection["searchkey"]; TempData["status"] = collection["status"]; List <Vendor> data = vendorrepo.GetBySearch(collection["searchkey"], collection["status"]); return(View(data)); } else { return(RedirectToAction("Login", "Home")); } }