string test = "username";
private void Page_Load(object sender, System.EventArgs e)
{
if(Application["User_" + test] == null || Application["User_" + test].ToString() != Request.UserHostAddress)
Session["login"] = null;
else
Response.Write(Session["login"].ToString() + "已登录
");
}
private void Button1_Click(object sender, System.EventArgs e)
{
Session["login"] = test;
Application["User_" + test] = Request.UserHostAddress;
}
本文作者:佚名 来源:http://www.cnblogs.com/yefei520/archive/2006/07/12
CIO之家 www.ciozj.com 微信公众号:imciow