public JsonResult GetListAsync(int?page, string words) { //Thread.Sleep(3000); string msg = "Afisare clienti"; bool ok = true; var model = new GridViewModel <ClientView>(); try { model = _clientRepo.Compute(page, words, Convert.ToInt32(Session["Id_User"])); if (model.Items == null) { msg = "List empty for this user"; ok = false; } } catch (Exception ex) { msg = ex.Message; ok = false; } return(Json(new { Success = ok, Message = msg, Html = ok ? this.RenderPartialView("_ClientsManagerList", model) : "" })); }