HttpCookie值在cookie中不可用

时间:2018-05-08 20:41:59

标签: httpcookie

我使用以下代码,但是当我退出并重新登录并且cookie存在但它没有值时。

        Dim timeclock_cookie As HttpCookie = New HttpCookie("TimeClock")
        timeclock_cookie.Expires = Date.Today.AddYears(1)
        timeclock_cookie.Values.Add("createdby", UserName)
        timeclock_cookie.Values.Add("createddate", Date.Today.ToString)
        timeclock_cookie.Values.Add("timezone", etz(ddlTimeZone.SelectedValue).timezone)
        timeclock_cookie.Values.Add("tzoffset", etz(ddlTimeZone.SelectedValue).offsetfromutc_minutes.ToString)

        Response.Cookies.Add(timeclock_cookie)

        Response.Redirect("~/login.aspx?err=15", True)

0 个答案:

没有答案