New to Telerik UI for ASP.NET MVCStart a free 30-day trial

Sitemap Binding

The TabStrip enables you to create its items by setting a sitemap.

  1. Make sure you followed all the steps from the introductory article on Telerik UI for ASP.NET MVC.

  2. Create a simple sitemap with the sample.sitemap file name at the root of the project.

    Razor
     <?xml version="1.0" encoding="utf-8" ?>
     <siteMap>
         <siteMapNode title="Home" controller="Home" action="Overview">
         <siteMapNode controller="grid" action="index" title="Grid" />
         <siteMapNode controller="tabstrip" action="index" title="TabStrip" />
         </siteMapNode>
     </siteMap>
  3. Load the sitemap using SiteMapManager.

    Razor
     public ActionResult Index()
     {
         if (!SiteMapManager.SiteMaps.ContainsKey("sample"))
         {
             SiteMapManager.SiteMaps.Register<xmlsitemap>("sample", sitmap => sitmap.LoadFrom("~/sample.sitemap"));
         }
         return View();
     }
  4. Add a TabStrip.

Razor
    @(Html.Kendo().TabStrip()
           .Name("tabstrip") // The name of the tabstrip is mandatory. It specifies the "id" attribute of the TabStrip.
        .BindTo("sample") // Bind to the sitemap with the name "sample".
     )

See Also

In this article
See Also
Not finding the help you need?
Contact Support