SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting Expiry Date in Response.Cache

    Hi,

    how can i set an expiry date in Response.Cache from code behind.

    below is my code, it work and appeared at no-cache at HTTP debugger Fiddler, but i can't set the expiry date(only appeared no-catche, and ther is no expiry date).

    please help me.

    Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
    Response.Cache.SetAllowResponseInBrowserHistory(true);
    Response.Cache.SetExpires(Convert.ToDateTime("Mon,31 May 2010 00:00:00 GMT"));
    Response.Cache.SetValidUntilExpires(true);

    thanks

  2. #2
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello, this is my latest result so far http://forums.asp.net/p/1419003/3149528.aspx


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •