asp.net uses .net controls to create drop-down navigation menus
Today’s small test is that the teacher asked us to use .NET controls to create a pull-down menu. The requirements are as follows:
Move the mouse to the parent menu to pop up 3 submenus. And each submenu has hyperlinks.
The following is the code I made myself:
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" Width="100%" Font-Size="14px" ForeColor="#161621" Font-Bold="True" PathSeparator="1" StaticEnableDefaultPopOutImage="False" > <DynamicMenuStyle BackColor="#D0E6DE" /> <DynamicMenuItemStyle ItemSpacing="5px" /> <Items> <asp:MenuItem Text="IT从业之家" Value=" http://www.3ppt.com " NavigateUrl="~/Introduce.aspx?id=1"> <asp:MenuItem Text="IT从业" Value="IT从业" NavigateUrl="~/Introduce.aspx?id=1"></asp:MenuItem> <asp:MenuItem Text="IT从业" Value="NavigateUrl="~/Introduce.aspx?id=2"></asp:MenuItem> <asp:MenuItem Text="IT从业" Value="IT从业" NavigateUrl="~/PIntroduce.aspx?id=1"></asp:MenuItem> <asp:MenuItem Text="IT从业" Value="IT从业" NavigateUrl="~/PIntroduce.aspx?id=2"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="IT从业" ValueNavigateUrl="~/News.aspx"></asp:MenuItem> <asp:MenuItem Text="IT从业" Value="IT从业" NavigateUrl="~/Product.aspx?id=1"> <asp:MenuItem Text="IT从业" Value="IT从业" NavigateUrl="~/Product.aspx?id=0"></asp:MenuItem> <asp:MenuItem Text="IT从业" Value="IT从业" NavigateUrl="~/Product.aspx?id=1"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="IT从业" Value="IT从业" NavigateUrl="~/Message.aspx"></asp:MenuItem> <asp:MenuItem Text="IT从业" Value="IT从业" NavigateUrl="~/Download.aspx"></asp:MenuItem> <asp:MenuItem Text="在线联系 " Value="在线联系" NavigateUrl="~/Content.aspx"></asp:MenuItem> </Items> </asp:Menu>
ASP.NET uses .net controls to realize the production of drop-down navigation menu