ComponentOne Menu for ASP.NET Web Forms
Menu Creation / Static Menu Creation
In This Topic
    Static Menu Creation
    In This Topic

    A static menu is the simplest way to create the menu structure.

    You can use the C1Menu Designer Form designer to build the menu system or you can use declarative syntax in the .aspx file to specify the menu items. To display static menu items using declarative syntax, first nest opening and closing <Item> tags between opening and closing tags of the Menu control. Next, create the menu structure by nesting <cc1:C1MenuItem>elements between opening and closing <Items> tags. Each <cc1:C1MenuItem> element represents a menu item in the control and maps to a C1MenuItem object.

    To write code in Source View

    <HideAnimation>
    <Animated Effect="fade"></Animated>
    </HideAnimation>
            <Items>
                <cc1:C1MenuItem runat="server" ImagePosition="Left" Text="LinkItem1">
                    <Items>
                        <cc1:C1MenuItem runat="server" ImagePosition="Left" Text="LinkItem1">
                        </cc1:C1MenuItem>
                        <cc1:C1MenuItem runat="server" ImagePosition="Left" Text="LinkItem2">
                        </cc1:C1MenuItem>
                    </Items>
                </cc1:C1MenuItem>
                <cc1:C1MenuItem runat="server" ImagePosition="Left" Text="LinkItem2">
                    <Items>
                        <cc1:C1MenuItem runat="server" ImagePosition="Left" Text="LinkItem1">
                        </cc1:C1MenuItem>
                        <cc1:C1MenuItem runat="server" ImagePosition="Left" Text="LinkItem2">
                        </cc1:C1MenuItem>
                    </Items>
                </cc1:C1MenuItem>
            </Items>
        </cc1:C1Menu>