I am using MVC4 C# and Kendo UI version 2012.2.913.340. I followed the kendo UI example for creating a menu that binds to the sitemap.xml. However my menu does not populate the data from my site map. I'm not sure why this would not be working.
My View:
@(Html.Kendo().Menu()
.Name("XmlMenu")
.BindTo("WebSiteMap"))
My controller:
public ActionResult Index()
{
if (!SiteMapManager.SiteMaps.ContainsKey("WebSiteMap"))
{
SiteMapManager.SiteMaps.Register<XmlSiteMap>("WebSiteMap", sitemap => sitemap.LoadFrom("~/Web.sitemap"));
}
return View());
}
Has anyone else had this issue?
My View:
@(Html.Kendo().Menu()
.Name("XmlMenu")
.BindTo("WebSiteMap"))
My controller:
public ActionResult Index()
{
if (!SiteMapManager.SiteMaps.ContainsKey("WebSiteMap"))
{
SiteMapManager.SiteMaps.Register<XmlSiteMap>("WebSiteMap", sitemap => sitemap.LoadFrom("~/Web.sitemap"));
}
return View());
}
Has anyone else had this issue?