C#页面缓存设置
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Sessioninfo(); } Session.Remove("info"); } private void Sessioninfo() { if (Session["info"] != null) tc.Text = Session["info"].ToString(); } private void sessionadd() { Session.Add("info", tc.Text); } //事件中添加 sessionadd();