public ActionResult SearchBy(FormCollection collection) { string svalue = collection["searchString"]; string scat = collection["searchBy"]; switch (scat) { case "Title": return(View("~/Views/User/Books.cshtml", BookCRUD.TitleSearch(svalue))); case "Genre": return(View("~/Views/User/Books.cshtml", BookCRUD.GenreSearch(svalue))); case "Author": return(View("~/Views/User/Books.cshtml", BookCRUD.AuthorSearch(svalue))); case "Category": return(View("~/Views/User/Books.cshtml", BookCRUD.CategorySearch(svalue))); } return(View("~/Views/User/Books.cshtml")); }