string skey=this.IdTxtBox.Text+"_"+this.PassTxtBox.Text;
string suser=Convert.ToString(Cache[skey]);
if(suser==null || suser==String.Empty)
{
TimeSpan sesstimeot =new TimeSpan(0,0,System.Web.HttpContext.Current.Session.Timeout,0,0);
HttpContext.Current.Cache.Insert(skey,skey,null,DateTime.MaxValue,sesstimeot,System.Web.Caching.CacheItemPriority.NotRemovable,null);
Session["User"] = skey;
Response.Redirect("index.htm");
}
else
{
this.MessageLab.Text="你的帳號已經有人在使用";
return;
}