Menu DataBinding issue

D

dvomsaal

I'm using the new Menu control and binding to an XML datasource. This
works fine the first time, but does not seem to refresh the data
unless I actually recycle the application pool. I have this in the
Load event of the Menu object (inherited from WebControls.Menu):

xml = DirectCast(Page.Session("MenuData"),
XmlDocument)

Dim xmlDS As New XmlDataSource()
xmlDS.Data = xml.OuterXml
xmlDS.XPath = "/*/*"

Dim mb As New MenuItemBinding()
mb.DataMember = "SiteMapNode"
mb.TextField = "Title"
mb.NavigateUrlField = "url"
Me.DataSource = xmlDS

Me.DataBindings.Add(mb)
Me.DataBind()

The xmlDS data gets set correctly, BUT the databinding results in the
same set of MenuItems that was there from the initial binding (first
one after app recycle). Am I missing something? Is something about
the Menu cached at the App level? We are using Adapters as well, but
I don't think their behavior comes in to play in this case.

This is killing me; any help/pointers would be VERY appreciated.

Thanks,
DvS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top