Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
739
Need example of WebDataMenu used with SiteMap
posted

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:

 

 

 

 

 

 

 

 

<ig:WebDataMenu ID="towerMenu" runat="server" DataSourceID="xmlTowerMenu"

 

 

ondatabound="towerMenu_DataBound" onload

="towerMenu_Load">

 

 

<DataBindings

>

 

 

<ig:DataMenuItemBinding DataMember="SiteMapNode" TextField="Title"

 

 

ValueField="Url"

/>

 

 

</DataBindings

>

 

 

</ig:WebDataMenu

>

If I try to access the WebDataMenu in the master page_load, it's null.  what am I doing wrong?

Parents
  • 4493
    Suggested Answer
    posted

    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.

Reply Children
No Data