Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to

I've started to use  Asp:menu with XmlDataSource based on Quick Start Example.

To show many top level elements I tried to specify XPath, but failed to do it correctly(probably due to missing XML namespace).
So I changed the XML schema aa suggested in Asp.Net Menu Control Binding with XMLDataSource  and used XPath="/Home/Menu" to not show single root Item.

Unfortunately DataBinding doesn't support default properties in XML file.All nodes must have all attributes, specified in DataBinding  section.
Otherwise InvalidOperationException like the following will be shown:
Could not bind to the 'Selectable' property (specified by SelectableField) while databinding Menu. Please check the Bindings fields. 

It was a requirement to show top left menu item differently than other top menu.I was able conditionally specify first node of a few siblings using "Home/menu[1]|" Then I was about to use Templates and follow approach from Customise Individual Menu Items article .But suddenly I understood, that it is simpler to have left top menu as one control and other menus as second control with diferent behavior -KISS.

Posted on Wednesday, January 30, 2008 9:33 AM ASP.NET | Back to top

Comments on this post: Using Asp:menu and XmlDataSource

# re: Using Asp:menu and XmlDataSource
Requesting Gravatar...
Hi, I'm having the similar issue, where the first node should hide items if the session value is null, once the session value is filled, i wanted to start showing those items.
I have tried to do..but its not refreshing and holding the old items
you can read more
can u share some thoughts on it
Left by Sudhir on Jun 03, 2008 6:11 AM

# re: Using Asp:menu and XmlDataSource
Requesting Gravatar...
view sol from
Left by SG on Jul 30, 2008 12:51 AM

# re: Using Asp:menu and XmlDataSource
Requesting Gravatar...
For troubleshooting these problems, check out various other XML software products on the market.
Left by XML Editor on Sep 16, 2010 3:46 AM

Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: