I have a vs2010 c# application, that uses SiteMapNode menu items in a Telerik RadMenu. After the app is published to IIS 7.5, then when selecting specific menu items (2 of 8), causes the first child node to be hidden. The node appears again after another node is selected.
This is a working application that I added two new menu node's too, that now does not function correctly.
Basically, I shouldn't have to change anything based on the currect working design - but what is required?
I have compaired working code to that which does not work, and found no distinct differences.
Why does one menu item change the visibility of another?
I am lost and unsure of a solution, any help would be appreciated,
SteveO...
protected void mainMenu_MenuItemDataBound(object sender, RadMenuEventArgs e) { SiteMapNode curNode = (SiteMapNode)e.Item.DataItem; switch (curNode.Title) { case "Users": if (role != "ADMIN") { if (e.Item.Parent != null) { e.Item.Visible = false; } } break; case "Reports": break; case "Search Stats": break; case "Report Stat Issues": break; default: if ((!curNode.Roles.Contains(unitid))) // configure menu based on users unit { if (e.Item.Parent != null) { e.Item.Visible = false; SiteMapDataSource.Parent.Visible = true; } else { e.Item.Visible = true; SiteMapDataSource.Parent.Visible = false; } } break; } }
<?xml version="1.0" encoding="utf-8" ?><siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" ><siteMapNode roles="*"><siteMapNode url="~/ManualStatsEntry.aspx" title="TAC Stats Entry" roles="3" description="TAC Stats Entry"></siteMapNode><siteMapNode url="~/POPSStatsEntry.aspx" title="POPS Stats Entry" roles="4" description="POPS Stats Entry"></siteMapNode><siteMapNode url="~/JAMStatsEntry.aspx" title="JAM Stats Entry" roles="5" description="JAM Stats Entry"></siteMapNode><siteMapNode url="~/GANGStatsEntry.aspx" title="GANG Stats Entry" roles="6" description="POPS Stats Entry"></siteMapNode><siteMapNode url="~/Stats_Reports.aspx" title="Reports" roles="*" description="Reports"></siteMapNode><siteMapNode url="~/Users.aspx" title="Users" roles="*" description="Users" ></siteMapNode><siteMapNode url="~/StatIssueSearch.aspx" title="Search Stats" roles="*" description="Search Stats" ></siteMapNode><siteMapNode url="~/StatIssueSubmit.aspx" title="Report Stat Issues" roles="*" description="Submit Stat Issues" ></siteMapNode></siteMapNode></siteMap>