public ActionResult SearchHotel1() { if (Request.Form["txtSearchHName"] == null && Request.Form["txtSearchCity"] != null) { //string city = Request.Form["rdbCity"]; string TS = Request.Form["txtSearchCity"]; if (TS.Length == 0) { ViewBag.msg = "City Name not entered"; } else { HD = Dbclass.GetCity(TS); if (HD.Count == 0) { ViewBag.List = null; ViewBag.msg = "no search found "; } else { ViewBag.List = HD; } //HD = Dbclass.GetHotelName(TS); } return(View("SearchHotelNew")); } else if (Request.Form["txtSearchHName"] != null && Request.Form["txtSearchCity"] == null) { //string HName = Request.Form["rdbHotelName"]; string TS = Request.Form["txtSearchHName"]; if (TS.Length == 0) { ViewBag.msg = "hotel Name not entered"; } else { HD = Dbclass.GetHotelName(TS); if (HD.Count == 0) { ViewBag.List = null; ViewBag.msg = "no search found "; } else { ViewBag.List = HD; } } return(View("SearchHotelNew")); } else if (Request.Form["txtSearchHName"] == null && Request.Form["txtSearchCity"] == null) { ViewBag.msg = "Invalid Credentials"; } return(View("SearchHotelNew")); }