如何在asp.net中设置菜单 [英] how to set menu in asp.net

查看:148
本文介绍了如何在asp.net中设置菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个带有菜单的网站主页,每当我在菜单项上移动鼠标时,都应突出显示该菜单项并在它们之间留出空格.
当我单击时,菜单项上将不会只有下拉列表事件将触发.

I would like to make a website home page with a menu that whenever I move mouse on menu item it should be highlighted and space between them.
There will not be drop down list only event on menu item will be fire when I click.

<asp:Menu ID="Menu1" runat="server" BackColor="#66CCFF"



         style="height: 25px " Font-Bold="True" Font-Names="Arial"

         Font-Size="Medium" ForeColor="#CC00CC" Height="27px" Width="388px"

         BorderStyle="Solid" Orientation="Horizontal">
         <Items>
             <asp:MenuItem Text="Home" Value="Home" NavigateUrl="~/WebForm1.aspx"></asp:MenuItem>
             <asp:MenuItem NavigateUrl="~/issuepage.aspx" Text="        Issue Item"

                 Value="Issue Item"></asp:MenuItem>
             <asp:MenuItem NavigateUrl="~/PurchaseItem.aspx" Text="Purchage Item"

                 Value="Purchage Item"></asp:MenuItem>
             <asp:MenuItem NavigateUrl="~/AddUser.aspx" Text="Add User" Value="Add User">
             </asp:MenuItem>
             <asp:MenuItem NavigateUrl="~/AddCategory.aspx" Text="Add Category"

                 Value="Add Category"></asp:MenuItem>
             <asp:MenuItem NavigateUrl="~/Addvendor.aspx" Text="Add Vender"

                 Value="Add Vender"></asp:MenuItem>
             <asp:MenuItem NavigateUrl="~/ReturnItem.aspx" Text="   Return Item"

                 Value="   Return Item"></asp:MenuItem>
         </Items>
     </asp:Menu>

推荐答案

不要一次又一次发布相同的问题,u可以使用注释进行任何小的更改.
这是我已经在最后一个问题上发布的解决方案.
首先,您要通过给定的详细概念清单.
http://ivreddy.com/how-to-create-menu-bar-in-c-sharp-dot-net-windows-application/

然后按照我的步骤进行操作
1-拖动MenuStrip
2- u将出现在此处键入-在此处写文章,因为它将显示文本.
3-在设计时双击Article菜单,然后将生成articleToolStripMenuItem_Click事件.
4-在事件中写入
article f2 = new article();//此处为您的表单名称.
f2.Show();
5次运行的应用程序.
Dont post same question again and again ,u can use comment for any small change.
here is solution i already posted at last question.
First u go through given list for detail concept.
http://ivreddy.com/how-to-create-menu-bar-in-c-sharp-dot-net-windows-application/

Then follow my steps;
1- Drag MenuStrip
2- u will appear Type Here -write there Article as it will be text be display.
3- Double Click on Article menu in design time then articleToolStripMenuItem_Click event will generate.
4- in event write
article f2 = new article();//aricle as ur form name here.
f2.Show();
5-run application.


另一个很好的例子 [
how to use menu control in asp.net[^]

another good example[^]


这篇关于如何在asp.net中设置菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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