ASP.NET2.0状态管理系列(6) 会话状态Session State

1.保存Session

protected void Button1_Click(object sender, EventArgs e)

{

Session["Name"] = TextBox3.Text;

 

}

2.读取Session

protected void Button2_Click(object sender, EventArgs e)

{

string name = (string)(Session["Name"]);

}

 

 

posted @ 2008-08-22 14:26  许晓光  阅读(192)  评论(0编辑  收藏  举报