1
まず最初に、私はaspの初心者です。質問があまりにも愚かですが、まだ私のWebページにドロップダウンリストを追加できませんmaterialize.cssを使用すること.Withoutドロップダウンが正常に動作しているが、それを具現化するファイルをリンクにworking.Iは、ツールボックスからドロップダウンリストだけでなく、実体に属する1つの両方を追加しようとしているのではなく、コードがあるものの、それが表示さ取得されていませんこれを解決するには?ここ
は、ツールボックス `ドロップダウンをmaterialize.cssでasp.net Webフォームに追加できません
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="font/material-design-icons/material.css" rel="stylesheet" type="text/css" />
<link href="styles/materialize.min.css" rel="stylesheet" type="text/css" />
<title></title>
<style>
.wraped {
margin-top:10px;
margin-left:20px;
margin-right:20px;
}
</style>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<div class="wraped">
<div class="container" style="width:80%">
<form id="form1" runat="server">
<div class="row">
<!--Navbar-->
<div class="col s4">
<asp:Image ID="logo" CssClass="z-depth-3 responsive-img" ImageUrl="~/images/logo.png" runat="server" Height="122px" Width="214px" />
</div>
<div class="col s6 offset-s2" style="border-bottom:solid 4px #669900;margin-top:25px;" >
<asp:Menu ID="Menu1" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" runat="server" StaticMenuStyle-HorizontalPadding="10px" Width="100%">
<StaticHoverStyle BackColor="#003300" ForeColor="White" />
<StaticMenuItemStyle Font-Names="Corbel" Font-Size="Large" ForeColor="#CC3300" HorizontalPadding="23px" Font-Bold="True" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
</div>
<!--Content-->
<div class="col s12" style="margin-top:20px;">
<asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList><!--Here is the drop down-->
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</form>
</div>
</div>
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
</body>
</html>
` から追加されたドロップダウンと私のマスターページのコードスニペットであり、これは、私は、Visual Studioを使用していマテリアライズ
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="font/material-design-icons/material.css" rel="stylesheet" type="text/css" />
<link href="styles/materialize.min.css" rel="stylesheet" type="text/css" />
<title></title>
<style>
.wraped {
margin-top:10px;
margin-left:20px;
margin-right:20px;
}
</style>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<div class="wraped">
<div class="container" style="width:80%">
<form id="form1" runat="server">
<div class="row">
<!--Navbar-->
<div class="col s4">
<asp:Image ID="logo" CssClass="z-depth-3 responsive-img" ImageUrl="~/images/logo.png" runat="server" Height="122px" Width="214px" />
</div>
<div class="col s6 offset-s2" style="border-bottom:solid 4px #669900;margin-top:25px;" >
<asp:Menu ID="Menu1" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" runat="server" StaticMenuStyle-HorizontalPadding="10px" Width="100%">
<StaticHoverStyle BackColor="#003300" ForeColor="White" />
<StaticMenuItemStyle Font-Names="Corbel" Font-Size="Large" ForeColor="#CC3300" HorizontalPadding="23px" Font-Bold="True" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
</div>
<!--Content-->
<div class="col s12" style="margin-top:20px;">
<div class="input-field">
<select>
<option value="" >Choose your option</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
</div><!--Here is the drop down-->
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</form>
</div>
</div>
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
</body>
</html>
のドロップダウンリストでコードスニペットです12
チェックこの回答:http://stackoverflow.com/questions/38170589/select-option-does-not-work-in-rails-using-materializecss/38175041#38175041。あなたの問題は同じだと私は信じています。 –
問題は、ドロップダウンリストが表示されないことです!そのスペースは完全に空白で表示されています。要素を調べると、コードが表示されます... jqueryの初期化も使用しましたが、それはまだ同じです – Sourajit