I have this code in my page (not using code behind). I would prefer to put the call in my master page CODE BEHIND(any thoughts on this?).
This code is not firing:
<head runat="server">
<title>Master Page</title>
<script runat="server" language="vb">
Public Sub LinkRemove(ByVal sender As Object, ByVal e As SiteMapNodeDataBoundEventArgs)
Dim arParams() As String = HttpContext.Current.Request.RawUrl.Split("/"c)
If e.Node.NavigateUrl = arParams(arParams.Length - 1) Then
e.Node.Enabled = False
End If
End Sub
</script>
</head>
...
<ComponentArt:SiteMap ID="smpTest2" runat="server"
SiteMapXmlFile="~/MasterPages/location01.xml"
BreadcrumbsLevelsToDisplay="10"
SiteMapLayout="Breadcrumbs"
CssClass="smpBreadCrumb"
LeafNodeCssClass="smpChildNodeStyle"
ChildNodeCssClass="smpChildNodeStyle"
BreadcrumbsSeparatorString=" > "
ParentNodeCssClass="smpParentNodeStyle"
OnNodeDataBound="LinkRemove"
>