Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Bind XML datasource to Menu

Thread Tools

Bind XML datasource to Menu
Posts: n/a
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"


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?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind Repeater's DataRow to GridView's DataSource wardemon ASP .Net 0 11-30-2006 06:20 PM
Object datasource bind problem Kevin ASP .Net 0 08-26-2006 09:48 AM
Bind a Label to an object Datasource control =?Utf-8?B?bWltbw==?= ASP .Net 0 01-03-2006 07:37 PM
ASP.NET 2.0 How-To: Bind datasource parameter to UserID? Luke Dalessandro ASP .Net 2 09-28-2004 06:49 PM
Easiest way to bind a grid datasource to a datatable =?Utf-8?B?S2VubmV0aA==?= ASP .Net 2 01-18-2004 12:16 PM