额 ,也许我可以帮助你 。
QQ:1286696702
protected void btnLogin1_Click(object sender, EventArgs e)
{
int i = this.checkLogin(txtName1.Text, txtPwd1.Text);
if (i > 0)
{
string str_Key = txtName1.Text + "_" + txtPwd1.Text;
string str_User = Convert.ToString(Cache[str_Key]);
if (str_User == String.Empty )
{
TimeSpan SessTimeOut = new TimeSpan(0, 0, HttpContext.Current.Session.Timeout, 0, 0);
HttpContext.Current.Cache.Insert(str_Key, str_Key, null, DateTime.MaxValue, SessTimeOut, CacheItemPriority.NotRemovable, null);
Session["User"] = str_Key;
Response.Write("");
Session["username"] = txtName1.Text;
}
else
{
Response.Write("