public JsonResult NewTest_ContentTab(int testid) { var common = new CommonService(); common.OnRenderPartialViewToString += (model) => { var result = String.Empty; try { result = this.RenderPartialViewToString("P_ContentTab", model); } catch (Exception) { common.success = false; common.message = Constants.DefaultExceptionMessage; } return result; }; common.NewTest_ContentTab(testid); return Json(new { common.generatedHtml, common.success, common.message }); }