public ActionResult Create(Location location) { using (var client = new HttpClient()) { var request = client.PostAsJsonAsync(url, location); request.Wait(); var response = request.Result.Content; var read = response.ReadAsStringAsync(); read.Wait(); var newRow = ""; if (read.Result == "true") { newRow = RenderRazorViewToString("_rowTemplate", new Location()); } return Json(new {isSuccess=read.Result,row=newRow}, "application/json", JsonRequestBehavior.AllowGet); } }
public ActionResult Update(Location location) { return null; }