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() + "已登录<br>");
}
private void Button1_Click(object sender, System.EventArgs e)
{
Session["login"] = test;
Application["User_" + test] = Request.UserHostAddress;
}
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() + "已登录<br>");
}
private void Button1_Click(object sender, System.EventArgs e)
{
Session["login"] = test;
Application["User_" + test] = Request.UserHostAddress;
}