/// <summary> /// This function is called when the client navigates to *hostname*/CompanyListings/Search /// </summary> /// <returns>A view to be sent to the client</returns> public ActionResult Search(string textCompanyName) { if (Globals.isLoggedIn() == false) { return(RedirectToAction("Index", "Authentication")); } ServiceBusConnection connection = ConnectionManager.getConnectionObject(Globals.getUser()); if (connection == null) { return(RedirectToAction("Index", "Authentication")); } CompanySearchRequest request = new CompanySearchRequest(textCompanyName); CompanySearchResponse response = connection.getCompanies(request); if (response.result == false) { return(RedirectToAction("Index", "Authentication")); } ViewBag.Companylist = response.list; return(View("Index")); }