public JsonResult GetAutomatedSearch(string _searchtext) { JobModel _objMod = new JobModel(); dynamic model = new ExpandoObject(); Job _objBus = new Job(); _objBus.searchText = _searchtext; //_objBus.FromPage = "B"; //if (Session["UserId"] != null) //{ // _objBus.FromPage = "J"; //} //else //{ // _objBus.FromPage = "B"; //} GetCategory(); _objBus.FromPage = category; List <Job> _JobList = new List <Job>(); _JobList = _objMod.GetAutomatedJobsForTrendingTags(_objBus); return(Json(_JobList, JsonRequestBehavior.AllowGet)); }