首页 > 代码库 > Session

Session

SetSession

protected void Page_Load(object sender, EventArgs e)
{
Session["userName"] = Request["txtName"];
}

GetSession

protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Session["userName"].ToString());
}

Session