为我的网站创建菜单下拉菜单 [英] Create menu dropdown for my website

查看:47
本文介绍了为我的网站创建菜单下拉菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我到处寻找并且没有取得任何进展。



基本上我需要一个菜单​​栏来降低某些项目。这也是一个水平菜单。在Sign Data下面会有一个下拉列表提交数据搜索数据视图数据。





首页登录数据

提交数据

搜索数据
查看数据



加上几列。基本上我只需要有人来帮助我理解我应该如何对其进行编码并使其正常工作。我尝试过使用其他网站的代码。或者观看其他人,但问题是我无法找到任何在Visual Studio中使用ASP.NET的人。



我正在使用ASP.Net主页



基本上



<%@ Master语言=C#AutoEventWireup =trueCodeBehind =Main.master.csInherits =Hidden.Main%> 

<!DOCTYPE html>

< html xmlns =http://www.w3.org/1999/xhtml>
< head runat =server>
< title> Thomas County Public Works< / title>
< link href =Main2.css =stylesheet/>
< asp:ContentPlaceHolder ID =headrunat =server>
< / asp:ContentPlaceHolder>
< style type =text / css>
.auto-style1 {

}
< / style>
< / head>
< body>
< form id =form1runat =server>
< div id =MainData>
< div id =Header>
< / div>
< div id =菜单>
< asp:Panel ID =pnMenurunat =server>
|< a href =Home.aspx> Home< / a> | < a href =Sign Data Submit.aspx> Sign Database< / a> | < a href =Road Database.aspx>道路数据库< / a> | < a href =Warehouse Database.aspx>仓库数据库< / a> | < a href =GIS Database.aspx> GIS数据库< / a> | < a href =Permits.aspx> Permits< / a> | < a href =Work Orders.aspx>工作订单< / a> |
< / asp:Panel>
< / div>
< div id =Contentclass =auto-style1>
< asp:ContentPlaceHolder ID =ContentPlaceHolder1runat =server>
< / asp:ContentPlaceHolder>
< / div>
< div id =Footer> hidden< / div>
< / div>
< / form>
< / body>
< / html>





我尝试过:



这就是我到目前为止所拥有的一切。我只需要知道如何使用菜单Div并将其转换为下拉菜单。谢谢!

解决方案

你有没有使用过Bootstrap?这是一个例子。加载页面后,将视图更改为水平,然后单击运行以查看示例。



Bootstrap菜单 - 示例 [ ^ ]



更多阅读

组件·引导程序 [ ^

Ive looked everywhere and have made no headway.

Basically I need a Menu bar that drops down on certain Items. This Is also a Horizontal Menu. Under Sign Data would be a drop down listing Submit Data Search Data View Data.


Home Sign Data
Submit Data
Search Data
View Data

Plus a few more columns. Basically I just need someone to help me understand how I'm supposed to code this and get it to work properly. Ive tried using code from other sites. Or watch other people but the problem is I cant find anyone that does it in ASP.NET from Visual Studio.

Im using a ASP.Net Master Page

basically

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Main.master.cs" Inherits="Hidden.Main" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Thomas County Public Works</title>
    <link href="Main2.css" rel="stylesheet" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
    <style type="text/css">
        .auto-style1 {
            
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="MainData">
        <div id="Header">
          </div>
    <div id="Menu">
            <asp:Panel ID="pnMenu" runat="server">
                  |<a href="Home.aspx">Home</a> | <a href="Sign Data Submit.aspx">Sign Database</a>| <a href="Road Database.aspx"> Road Database</a> | <a href="Warehouse Database.aspx">Warehouse Database</a> | <a href="GIS Database.aspx"> GIS Database</a> | <a href="Permits.aspx">Permits</a> | <a href="Work Orders.aspx"> Work Orders</a>|
                     </asp:Panel>
        </div>
        <div id="Content" class="auto-style1">
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">                           
        </asp:ContentPlaceHolder>
           </div>
        <div id="Footer">hidden</div>
   </div>
    </form>                  
    </body>
</html>



What I have tried:

This is all that I have so far. I just need to know how to take that menu Div and turn it into a drop down menu. Thanks!

解决方案

Have you though about using Bootstrap ? Here is an example. Once the page loaded, change the view to Horizontal and click on Run to see the example.

Bootstrap Menu - Example[^]

More reading
Components · Bootstrap[^]


这篇关于为我的网站创建菜单下拉菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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