public JsonResult GetNotificationUser() { var notificationRegisterTime = Session["LastUpdated"] != null?Convert.ToDateTime(Session["LastUpdated"]) : DateTime.Now; NotificationComponent NC = new NotificationComponent(); var list = NC.GetUser(notificationRegisterTime); Session["LastUpdated"] = DateTime.Now; return(new JsonResult { Data = list, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }