コード例 #1
0
ファイル: CheckedInput.ashx.cs プロジェクト: ErekTan/HLedo
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Clear();

            BLL.UserInfoExt bllUserInfo = new BLL.UserInfoExt();

            string strUserName = context.Request["UName"];
            string strEmail = context.Request["UEmail"];
            string strType = context.Request["UType"];

            switch (strType)
            {
                case "1":
                    //注册时判断用户名是否存在
                    context.Response.Write(bllUserInfo.IsExistUserName(strUserName).ToString());
                    break;
                case "2":
                    //注册时判断邮箱是否存在
                    context.Response.Write(bllUserInfo.IsExistEmail(strEmail).ToString());
                    break;
            }
            context.Response.End();
        }