我使用以下代码,但是当我退出并重新登录并且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)