Setting Cookie.Expires

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe

    #1

    Setting Cookie.Expires

    I'm trying to set the Expires property of a cookie in a control by doing the
    following:
    this.Context.Re sponse.Cookies["mycookie"].Expires =
    DateTime.Today. AddDays(1);

    But when I refresh the page and check the same
    this.Context.Re sponse.Cookies["mycookie"].Expires it has the default date
    1/1/0001.

    Any idea what I'm doing wrong?

    Thanks,
    Joe


Working...