Build ASP.NET Easy Menu from SiteMap with just a few lines of code.
Just add to your project the EasyMenuBindToSiteMap class.
EasyMenuSiteMap.IsVertical = true;
EasyMenuSiteMap.IsVertical = false;
|
ASPX
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" /> <asp:PlaceHolder ID="PlaceHolder1" runat="server" /> <oem:EasyMenu id="EasyMenu1" runat="server" ShowEvent="Always" Width="150px" StyleFolder="/em/emstyles/styles/horizontal1" Position="Vertical" />
C#
EasyMenuBindToSiteMap EasyMenuSiteMap = new EasyMenuBindToSiteMap();
EasyMenuSiteMap.IsVertical = true;
EasyMenuSiteMap.ShowEvent = MenuShowEvent.MouseOver;
EasyMenuSiteMap.StyleFolder = "/em/emstyles/styles/horizontal1";
EasyMenuSiteMap.Width = "150px";
EasyMenuSiteMap.IDPrefix = "EasyMenu1_";
EasyMenuSiteMap.BuildMenu(EasyMenu1, PlaceHolder1, SiteMapDataSource1);