stellar echo

Rebinding to an XmlDataSource in .NET 2.0

by on Oct.06, 2006, under Development

This damn problem had me baffled for an entire wasted day. I had a simple XmlDataSource binding to a GridView. However when changes to the data source were made, the gridview seemed to retain its databinding to the previous datasource.

The problem lay with the XmlDataSource control having the EnableCaching property set to True by default. Toggeling this option resolved the issue. Thankyou .NET for a wasted day of development.

Dim xmlDs As New XmlDataSource
With xmlDs
.EnableCaching = False
.Data = XMLHelper.SerializeObjectToXML(LeadMgmtController.Data.Data, GetType(Leads), True)
.XPath = “LeadViews/LeadView”
.TransformFile = “~/xslt/leadview.xslt”
.DataBind()
End With

:,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!