示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     POCOS.AppUser o = POCOS.AppUser.Single("Select * from AppUsers where ID=@0", Common.UserID);
     aboutu.Value           = o.About;
     email.Value            = o.Email;
     first_name.Value       = o.FirstName;
     username1.Value        = o.Name;
     location.Value         = o.Location;
     website.Value          = o.Website;
     uploadedUserImage.Src  = Common.UploadedImageRelPath + o.Avatar + "?width=170";
     usernameview.InnerHtml = Common.Domain + "users/" + o.Name;
     Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
     Response.Cache.SetCacheability(HttpCacheability.NoCache);
     Response.Cache.SetNoStore();
     Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
 }
示例#2
0
        public void ProcessRequest(HttpContext context)
        {
            string name = context.Request.Params["name"];

            POCOS.AppUser obj = POCOS.AppUser.Single(string.Format("Select * from AppUsers WHERE Name='{0}'", name));
            Common.UpdateCookie(Common.InfoCookie, JObject.FromObject(new
            {
                vuID     = obj.ID,
                vuemail  = obj.Email,
                vuname   = obj.Name,
                vuavatar = Common.UploadedImageRelPath + obj.Avatar
            }));
            context.Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
            context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
            context.Response.Cache.SetNoStore();
            context.Response.WriteFile("LoggedIn.aspx");
        }