New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Customizing Appearance

The semantic markup rendered by RadSiteMap yields itself to easy and flexible styling using CSS.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • Styles.css
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="SiteMap.Examples.CustomizingAppearance.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadSiteMapDataSource runat="server" ID="RadSiteMapDataSource1" ShowStartingNode="false"
        SiteMapFile="~/Examples.sitemap"></telerik:RadSiteMapDataSource>

    <div class="demo-container no-bg">
        <telerik:RadSiteMap runat="server" ID="RadSiteMap1" Skin="Default" DataSourceID="RadSiteMapDataSource1"
            MaxDataBindDepth="2" >
            <LevelSettings>
                <telerik:SiteMapLevelSetting Level="0" MaximumNodes="3">
                    <ListLayout RepeatDirection="Vertical" RepeatColumns="3"></ListLayout>
                    <NodeTemplate>
                        <h3 class="Header">
                            <%# DataBinder.Eval(Container.DataItem, "title") %>
                        </h3>
                    </NodeTemplate>
                </telerik:SiteMapLevelSetting>
            </LevelSettings>
        </telerik:RadSiteMap>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance