public void ProcessRequest(HttpContext context) { //context.Response.ContentType = "text/plain"; //context.Response.Write("Hello World"); string username = System.Web.HttpUtility.UrlDecode(context.Request["username"]); string password = System.Web.HttpUtility.UrlDecode(context.Request["password"]); try { UserBLL insUserBLL = new UserBLL(); if (insUserBLL.UserRegist(username, password) == "注册成功") { //context.Session.Add("loginName", username); context.Application.Add("loginName", username); //HttpApplication httpApp = new HttpApplication(); //httpApp.Application.Add("loginName", username); context.Response.Write("success"); } else { context.Response.Write("fail"); } } catch(Exception ex) { throw ex; } }
public void ProcessRequest(HttpContext context) { //context.Response.ContentType = "text/plain"; //context.Response.Write("Hello World"); UserInfoVO strUserInfo = new UserInfoVO(); strUserInfo.LoginName = context.Application.Equals("loginName").ToString(); strUserInfo.UserName = System.Web.HttpUtility.UrlDecode(context.Request["username"]); strUserInfo.Birthday = Convert.ToDateTime(System.Web.HttpUtility.UrlDecode(context.Request["birthday"])); strUserInfo.Sex = System.Web.HttpUtility.UrlDecode(context.Request["sex"]); strUserInfo.School = System.Web.HttpUtility.UrlDecode(context.Request["school"]); strUserInfo.Job = System.Web.HttpUtility.UrlDecode(context.Request["job"]); strUserInfo.Mobilphone = System.Web.HttpUtility.UrlDecode(context.Request["mobilphone"]); strUserInfo.QQ = System.Web.HttpUtility.UrlDecode(context.Request["qq"]); strUserInfo.Msn = System.Web.HttpUtility.UrlDecode(context.Request["msn"]); strUserInfo.Weibo = System.Web.HttpUtility.UrlDecode(context.Request["weibo"]); try { UserBLL insUserBLL = new UserBLL(); if (insUserBLL.UpdateUserInfo(strUserInfo) == true) { context.Response.Write("success"); } else { context.Response.Write("fail"); } } catch (Exception ex) { } }
public void ProcessRequest(HttpContext context) { string username = context.Request["username"].ToString(); string password = context.Request["password"].ToString(); try { UserBLL insUserBLL = new UserBLL(); if (insUserBLL.Login(username, password) == password) { context.Response.Write("success"); //存储session } else { context.Response.Write("fail"); } } catch (Exception ex) { throw ex; } }