Session["myValue"] = "new value";
$.ajax({ type: "GET", url: "/myController/getValue", data: {}, success: function (result) { var myValue = result; } });
public ActionResult getValue() { return Json(Session["myValue"], JsonRequestBehavior.AllowGet); }
现在,您就可以更新jquery变量并将其更新为存储在会话变量中的新值了。