I have a project with 2 types of users. I want only the Supervisors to be able to view the "User Management" page. This page is a child node of my rad menu and it seems that I can only hide the title node or I get this error:
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
How do I hide just some of the pages in the child nodes?
<siteMapNode title="Users" roles="Supervisor" target="_blank">
<siteMapNode url="UsersOnline.aspx" title="Users Online" target="_blank" />
<siteMapNode url="UserManagement.aspx" title="User Management" target="_blank" />
</siteMapNode>
Protected Sub RadMenu1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles RadMenu1.ItemDataBound
Dim node As SiteMapNode = TryCast(e.Item.DataItem, SiteMapNode)
If Not String.IsNullOrEmpty(node("target")) Then
e.Item.Target = node("target")
End If
If e.Item.Text = "User Management" AndAlso msUserType = "Standard" Then
RadMenu1.Items.Remove(e.Item)
End If
End Sub