//FillUP Employee Details public ActionResult FillData(string Data, string Search, int?page) { //return View(db.FillEmployee().ToList()); if (Data == "1" && Search != "") { long ser = Convert.ToInt64(Search); return(View(db.FillEmployee().Where(x => x.ID == ser).ToList().ToPagedList(page ?? 1, 10))); } else { return(View(db.FillEmployee().Where(x => Search == null || x.UserName.StartsWith(Search)).ToList().ToPagedList(page ?? 1, 10))); } }