ComponentOne Menu for ASP.NET AJAX: Menu for ASP.NET Task-Based Help > Creating Different Menu Types > Create Submenus > Add Menu Items and Submenu Items to C1Menu Declaratively

Add Menu Items and Submenu Items to C1Menu Declaratively

Select the source tab to switch to source view and add the following HTML markup within the <body> tags.

<form id="form1" runat="server">

        &nbsp;&nbsp;<cc1:C1Menu ID="C1Menu1" runat="server" VisualStylePath="~/C1WebControls/VisualStyles">

            <Items>

                <cc1:C1MenuItem runat="server" Text="Item 1" NestedGroupWidth="120px">

                    <Items>

                        <cc1:C1MenuItem runat="server" Text="Submenu Item 1">

                        </cc1:C1MenuItem>

                        <cc1:C1MenuItem runat="server" Text="Submenu Item 2">

                        </cc1:C1MenuItem>

                    </Items>

                </cc1:C1MenuItem>

                <cc1:C1MenuItem runat="server" Text="Item 2">

                </cc1:C1MenuItem>

                <cc1:C1MenuItem runat="server" Text="Item 3">

                </cc1:C1MenuItem>

            </Items>

        </cc1:C1Menu>

        <asp:ScriptManager ID="ScriptManager1" runat="server" />

        <div>

        </div>

    </form>


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.