protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.Response.Cache.AddValidationCallback(new HttpCacheValidateHandler(ValidateCacheOutput), null); } protected void ValidateCacheOutput(HttpContext context, object data, ref HttpValidationStatus status) { string name = context.Request.QueryString.Get("name"); if (name.ToLower().Equals("john")) status = HttpValidationStatus.IgnoreThisRequest; else status = HttpValidationStatus.Valid; }
Sunday, July 25, 2010
How to invalidate a asp.net response cache based on a condition - Asp.net
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
-
Demo : I am using asp.net UpdatePanel control to partial page update. As there is no keyup event for the asp.net TextBox control, I add an ...
No comments:
Post a Comment