This question is locked. New answers and comments are not allowed.
Good Morning,
I'm using the MvcSiteMapProvider in my application and am seeing Error CS1026 when viewing in browser. Here's the code I've written thus far:
View (MenuPartial):
Menu Controller:
Global.asax:
Can anyone identify the source of the compliation error? Note that the error message states ") expected". However, intellisense didn't pickup any errors and the solution built successfully.
Thanks much for your help and guidance.
Sid
I'm using the MvcSiteMapProvider in my application and am seeing Error CS1026 when viewing in browser. Here's the code I've written thus far:
View (MenuPartial):
@using Telerik.Web.Mvc.UI; @using MvcSiteMapProvider; @(Html.Telerik().Menu() .Name("Menu") .BindTo(Html.MvcSiteMap().Provider.RootNode.ChildNodes, mappings => mappings.For<MvcSiteMapNode>(binding => binding .ItemDataBound((item, node) => { item.Text = node.Title; item.ActionName = node.Action; item.ControllerName = node.Controller; }) .Children(node => node.ChildNodes))) .Render(); ) Menu Controller:
using System.Web.Mvc; using Telerik.Web.Mvc; namespace Veehco.Controllers { public partial class MenuController : Controller { [PopulateSiteMap(SiteMapName = "Veehco", ViewDataKey = "Veehco")] public ActionResult SiteMapBinding() { if (!SiteMapManager.SiteMaps.ContainsKey("Veehco")) { SiteMapManager.SiteMaps.Register<XmlSiteMap>("Veehco", sitemap => sitemap.LoadFrom("~/Veehco.sitemap")); } return View(); } } }Global.asax:
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); SiteMapManager.SiteMaps.Register<XmlSiteMap>("Veehco.sitemap", sitemap => sitemap.Load()); }Can anyone identify the source of the compliation error? Note that the error message states ") expected". However, intellisense didn't pickup any errors and the solution built successfully.
Thanks much for your help and guidance.
Sid