Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Bind XML datasource to Menu (http://www.velocityreviews.com/forums/t779705-bind-xml-datasource-to-menu.html)

dvomsaal@ddrtech.com 03-20-2007 01:57 PM

Bind XML datasource to Menu
 
I have created a XmlDocument that contains the exact layout that
siteMap uses, and then I bind my Menu object to it:

Dim xml As XmlDocument
xml = DirectCast(Session("MenuData"), XmlDocument)


Dim xmlDS As New XmlDataSource()
xmlDS.Data = xml.OuterXml


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


MainMenu.DataBindings.Add(mb)
MainMenu.DataBind()


The problem is when it displays it always shows the root element
("siteMap"). If you use a static site map you have an option to turn
this off; am I missing the ability to do that since I'm using XML?


Thanks,
DvS



All times are GMT. The time now is 05:35 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.