The issue is that the XmlDataSource control has caching enabled by default, which is why you always see the same row getting bound (unless you rebuild the app or restart the web server). Just modify the XmlDataSource code as follows, and it will work (new
code in bold):
G Andrew Dut...
Member
227 Points
46 Posts
ASPInsiders
Re: TreeView does not show new datasource
Oct 03, 2006 01:33 PM|LINK
The issue is that the XmlDataSource control has caching enabled by default, which is why you always see the same row getting bound (unless you rebuild the app or restart the web server). Just modify the XmlDataSource code as follows, and it will work (new code in bold):
XmlDataSource dataSource = new XmlDataSource(); dataSource.EnableCaching = false; dataSource.Data = xmlStrList[i];Regards,
Andrew
Caching ASP.NET 2.0 TreeView XmlDataSource
Code Camps in the Mid-Atlantic