2013年9月27日 星期五

[asp.net] [c#] session使用方法


//建立
Session.Add("sessionName", "123");
//or
Session["sessionName"] = "123";
//取值
string s = Session["sessionName"].ToString();
//移除
Session.Remove("sessionName");

沒有留言: