如何使用C#2005在Web应用程序表单中添加菜单和菜单项 [英] How to Add Menus and Menu Items in a Web Application Form Using C# 2005

查看:102
本文介绍了如何使用C#2005在Web应用程序表单中添加菜单和菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

菜单项可能包含诸如:
-部门
-护理Dpt
-医疗Dpt
-管理员
-医院
-GH Minna
-GH Kagara

谢谢
真诚的
M.A. Busu Esq.

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.

推荐答案



我假设您是在设计时问有关在asp.net Web应用程序中添加菜单的问题.它只是在主文件中添加标记(如果菜单必须出现在所有页面中)

当您打开默认的主aspx文件(site.master)时,可以看到该示例.分层添加菜单项.
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.
 <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


这篇关于如何使用C#2005在Web应用程序表单中添加菜单和菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆