This question is locked. New answers and comments are not allowed.
I have something similar to the sample but it is not working,
view
I put a breakpoint in the controller and it never got there.
I get an error from the view in it tells me there is no sample.
{"You must have SiteMap defined with key \"sample\" in ViewData dictionary."}
what am i missing
view
Html.Telerik().TreeView()
.Name(
"TreeView")
.BindTo(
"sample")
Controller
[PopulateSiteMap(SiteMapName = "sample", ViewDataKey = "sample")]
public ActionResult SiteMapBinding()
{
if (!SiteMapManager.SiteMaps.ContainsKey("sample"))
{
SiteMapManager.SiteMaps.Register<XmlSiteMap>("sample", sitmap => sitmap.LoadFrom("~/sample.sitemap"));
}
return View();
}
I put a breakpoint in the controller and it never got there.
I get an error from the view in it tells me there is no sample.
{"You must have SiteMap defined with key \"sample\" in ViewData dictionary."}
what am i missing