Tuesday, June 10, 2008

ASP.NET 2.0: XmlDataSource - Default Caching Feature

This is because, by default, the EnableCaching propery is set to "true". You can also find that the CacheDuration is set to "Infinite". This forces the Data in the XmlDataSource to be cached and hence the change in the underlying Data, wont get reflected.
The resolution is to set the EnableCaching property to false or specify a CacheKeyDependency, or set the CacheDuration to a lesser time.


To referesh XmlDataSource as current data put EnableCaching="false"



http://www.visli.com/

No comments: