[WebMethod(EnableSession = true)]
public bool login(string userName, string password) { if (Session["user"] != null) return true; if (userName == password && userName.Length == 5) { Session["user"] = userName; return true; } return false; }
设置 EnableSession=true 属性 必须滴