How can we prevent browser from caching an ASPX page?

ANS:-  We can SetNoStore on HttpCachePolicy object exposed by the Response object’s Cache property:

Response.Cache.SetNoStore ();
Response.Write (DateTime.Now.ToLongTimeString ());

No comments:

Post a Comment