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
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