/// <summary> /// 验证用户名或邮件是否存在 /// </summary> /// <param name="context"></param> public static void CheckNameAndEmail(HttpContext context) { string name = context.Request.Form["n"]; string email = context.Request.Form["e"]; int ret = 0; bool bName, bEmail; UserAccount.CheckNameAndEmail(name, out bName, email, out bEmail); if (bName && bEmail) ret = 3; else if (bName) ret = 1; else if (bEmail) ret = 2; context.Response.Write(ret); }