Click here to Skip to main content
15,921,694 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the Menu Item May Contains such as:
-Department
-Nursing Dpt
-Medical Dpt
-Admin
-Hospitals
-GH Minna
- GH Kagara

thanks
yours sincerely
M.A. Busu Esq.
Posted

1 solution

Hi,

I assume you are asking about adding menus in asp.net web app at design time. It is simply adding th markup in the master file (if the menu has to appear in all the pages)

The example can be seen when you open the default master aspx file (site.master). Add the menu items hierarchially.
XML
 <asp:menu id="NavigationMenu" runat="server" cssclass="menu" enableviewstate="false" includestyleblock="false" orientation="Horizontal" xmlns:asp="#unknown">
    <items>
        <asp:menuitem navigateurl="~/Default.aspx" text="Home" />
        <asp:menuitem navigateurl="~/About.aspx" text="About" />
        <asp:menuitem text="Hospital Management" value="Hospital Management">
            <asp:menuitem navigateurl="~/department.aspx" text="Department">
                Value="Department"></asp:menuitem>
            <asp:menuitem navigateurl="~/nursing.aspx" text="Nursing Department">
                Value="Nursing Department"></asp:menuitem>
        </asp:menuitem>
    </items>
</asp:menu>

If you are asking about adding menus at runtime, then please explain more what exactly you want
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900