Hi -
I've been using UltraWebMenu in my apps to display site navigation using a site map. I want to try the new WebDataMenu but can't get it to work at all. I have a Master Page containing the menu as well as a script manager. I've created an XmlDataSource and also a SiteMapDataSource that point to my site map file but I can't make anything happen. My code looks like this:
="towerMenu_Load">
>
/>
If I try to access the WebDataMenu in the master page_load, it's null. what am I doing wrong?
Hello,
Are you using a XMLDataSource ot SiteMapDataSource. These are two different data sources.
For the SiteMap Datasource, you must specify "Default" data member in the DataMenuItemBinding:
<ig:DataMenuItemBinding DataMember="Default" NavigateUrlFields="Url" TextField="title" ToolTipField="description" TargetField="target" />
And also use NavigateUrlFields (instead of Value) binding property to map to the Url from the SiteMap Node to the NavigateUrl field of menu item. This should fix your issues.
I'm using a SiteMapDataSource. Your advice solved my problem, as I was using "siteMapNode" as the data member instead of "Default". I also had another issue which was my fault - I was using the form designer and VS stuck my menu in the content placeholder area for the content page, which was causing it not to render.
Once I fixed those two problems and then set the menu to Horizontal, width=100% and set my sitemapdatasource to not show the starting node, I was fine.
Thanks for the help.