Exemplo n.º 1
0
    private void MarkReadClick(object sender, ImageClickEventArgs e)
    {
        if (IsAuthenticated)
        {
            if (Session["_LastVisit"] == null)
            {
                HttpContext.Current.Session.Add("_LastVisit", hdnLastOpened.Value);
            }
            else
            {
                Session["_LastVisit"] = hdnLastOpened.Value;
                Session["_LastVisit"] = hdnLastOpened.Value;
            }
            var since = SnitzCookie.GetLastVisitDate();
            if (since != null)
            {
                SnitzCookie.SetLastVisitCookie("0");
            }

            Response.Redirect(Request.RawUrl);
        }
        else
        {
            Session["_LastVisit"] = DateTime.UtcNow.ToForumDateStr();
        }
    }