public ActionResult AddRow() { DashboardRow DBRow; try { DashboardWidget qw = new DashboardWidget(ConnectionString); GetDashboardObject DashBoardObject = (GetDashboardObject)Session["DashBoard"]; DBRow = qw.AddRow(DashBoardObject.id, false, -1); if (DashBoardObject.rows == null) { DashBoardObject.rows = new List <DashboardRow>(); } DashBoardObject.rows.Add(DBRow); Session["DashBoard"] = DashBoardObject; return(CS.ReturnForJQuery(DBRow)); } catch (Exception ex) { return(CS.ReturnForJQuery(new JavaScriptSerializer().Serialize(new ISTAT.WebClient.Models.ControllerSupport.StringResult() { Msg = ex.Message }))); } }