I'm using user control caching quite often with the outputcache declaration but I’m trying to disable the cache in some case to give a fresh view to the user.
I’ve tried this :
PartialCachingControl tc = (PartialCachingControl)LoadControl("~/_UC/myuc.ascx");
if (mycondition)
{
tc.CachePolicy.Cached = false;
tc.CachePolicy.Duration = new TimeSpan(0);
}
myplaceholder.Controls.Add(tc); ...
Go to the complete details ...