hi all,
I have a master page and a mySite.sitemap. I don't know what is wrong with my sql database setup, nevertheless the securityTrimmingEnabled in my web.config file does not do anything. Because I'm in a rush I would like to just hide/show menu items progarmatically based on my 2 possible roles my users can have. There is just one menu, two levels deep with just a few items each. For one role I need to show only two sub-items in the first item, all of them for the rest.
It is somewhat strange that Roles.Provider.GetRolesForUser("user1") is giving me the right value ...
Any idea how I hide menu items in my master page?
<form id="form1" runat="server"><asp:SiteMapDataSource SiteMapProvider="WebSitemapProvider" ID="SiteMapDataSource1" runat="server" /><div id="header"> </div><div id="breadcrumbs"> <asp:SiteMapPath SiteMapProvider="reloWebSitemapProvider" ID="SiteMapPath1" runat="server"></asp:SiteMapPath></div><div id="menu"> <asp:Menu ID="Menu1" DataSourceID="SiteMapDataSource1" runat="server" DynamicMenuItemStyle-CssClass="btn" BackColor="#B5C7DE" DynamicHorizontalOffset="2" Font-Bold="True" Font-Names="Arial" Font-Size="Small" ForeColor="Black" StaticSubMenuIndent="30px" StaticDisplayLevels="2"><StaticSelectedStyle BackColor="#507CD1" /><StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="20px" /><DynamicHoverStyle BackColor="#284E98" ForeColor="White" /><DynamicMenuStyle BackColor="#B5C7DE" /><DynamicSelectedStyle BackColor="#507CD1" /><DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="20px" /><StaticHoverStyle BackColor="#284E98" ForeColor="White" /></asp:Menu></div><div id="content" style="position: relative; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto; z-index: auto;"><asp:ContentPlaceHolder id="Main_ContentHolder" runat="server"></asp:ContentPlaceHolder></div><div id="footer"> </div></form>