PathSeparator property in SiteMapPath control in

SiteMapPath PathSeparator Property
SiteMapPath is an web server control. sitemappath control's PathSeparator property get or set the string that delimits sitemappath nodes in the rendered navigation path. the PathSeparator property value data type is System.String. this 'String' value represents the delimiter for the nodes in a navigation path.

the default path separator is '>' which indicate path direction is left to right (RootToCurrent). we can set any valid string or character as sitemappath control's path separator.

the following c# example code demonstrate us how can we use sitemappath PathSeparator property to assign a custom path separator in an application.
<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">


<html xmlns="">
<head runat="server">
    <title>Asp.Net SiteMapPath example: using PathSeparator property in SiteMapPath control</title>
    <form id="form1" runat="server">
        <h2 style="color:Teal">Using SiteMapPath with PathSeparartor property</h2>
        <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
        <asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana" 
            Font-Size="0.8em" PathSeparator=" |" BackColor="#FDECF3" 
            <PathSeparatorStyle Font-Bold="True" ForeColor="#507CD1" />
            <CurrentNodeStyle ForeColor="Red" />
            <NodeStyle Font-Bold="True" ForeColor="#284E98" />
            <RootNodeStyle Font-Bold="True" ForeColor="#507CD1" />
        <hr />
        <h2 style="color:Purple">BulletedList Example Page</h2>
        <asp:BulletedList ID="BulletedList1" runat="server">

Related examples