On my previous post Georgio provided a sample app that has a tabstrip bound to a sitemap, registered in global.asax.cs and bound in the sitemaster (see http://www.telerik.com/community/forums/aspnet-mvc/tabstrip/can-you-put-the-tabstrip-in-a-master-page.aspx#1235366). When I moved the code to my project, I added this to the global.asax.cs:
protected void Application_Start()
{
// register the sitemaps into SiteMapManager.SiteMaps collection
SiteMapManager.SiteMaps.Register<XmlSiteMap>("AdminSitemap", sitmap => sitmap.LoadFrom("~/Sitemaps/Admin.sitemap"));
....
and this to my view:
<%
= Html.Telerik()
.TabStrip()
.Name(
"TabStrip")
.BindTo(
"AdminSitemap")
%>
and this to the bottom of my site.master before the end body tag:
<% Html.Telerik().ScriptRegistrar().OnDocumentReady(() =>
{
%>
jQuery('#TabStrip').bind('dataBound', function(){Sys.Mvc.FormContext._Application_Load()})
<%
})
. Render();
%>
When I run this project that looks to me like the sample project, I get:
Server Error in '/' Application.
You must have SiteMap defined with key "AdminSitemap" in ViewData dictionary.
What am I missing? Where does the AdminSitemap get loaded into the viewdata for the home view?
Thanks,
Bill