0
我正在開發一個項目,此刻我最近接管了Umbraco CMS(4.7.1)並寫入了該項目在ASP.net中,我不確定我在做什麼並且陷入困境。CSS不會出現在一個asp.net頁面上,其他人可以使用
這個CSS不會出現在一個頁面上,ContactUs頁面(contact-us.aspx),但CSS在其他地方顯得非常好,我覺得這很奇怪。
所以我的問題是我需要做什麼才能讓CSS出現在這個頁面上,就像其他人一樣?
這裏是接觸我們的模板:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="ContactUs.master.cs" Inherits="GreenHill.masterpages.ContactUs"
MasterPageFile="~/umbraco/masterpages/default.master"%>
<%@ Register TagPrefix="gh" TagName="ProductNav" Src="~/usercontrols/ProductNav.ascx" %>
<%@ Register TagPrefix="gh" TagName="ProductListing" Src="~/usercontrols/ProductListing.ascx" %>
<%@ Register TagPrefix="gh" TagName="Twitter" Src="~/usercontrols/Twitter.ascx" %>
<asp:Content runat="server" ID="pageContent" ContentPlaceHolderID="content">
<div class="title">
<h1>
<asp:Literal ID="litTitle" runat="server"></asp:Literal></h1>
</div>
<div class="brown-border"></div>
<table class="content">
<tr>
<td class="left main-column">
<asp:Image runat="server" ID="imgHero" />
</td>
<td class="side-panel" rowspan="2">
<gh:Twitter runat="server" id="ucTwitter"></gh:Twitter><br />
</td>
</tr>
<tr>
<td>
<table class="small-table">
<tr>
<td class="left">
<h2>Contact Us</h2>
</td>
<td>
<h2>Say hi to the team</h2>
</td>
</tr>
<tr>
<td colspan="2">
<div class="brown-border small-table-separator"></div>
</td>
</tr>
<tr>
<td>
<asp:Literal runat="server" ID="litContent"></asp:Literal>
</td>
<td>
<form ID="form1" runat="server">
<div class="form">
<ul>
<li>
<asp:TextBox ID="txtName" runat="server" placeholder="Name"></asp:TextBox>
</li>
<li>
<span id="nameError" class="error-message" style="display:none;">Please enter your name.</span>
</li>
<li>
<asp:TextBox ID="txtEmail" runat="server" placeholder="Email"></asp:TextBox>
</li>
<li>
<span id="emailError" class="error-message" style="display:none;">Please enter your email address.</span>
</li>
<li>
<asp:TextBox ID="txtMessage" runat="server" Rows="5" TextMode="MultiLine" placeholder="Message"></asp:TextBox>
</li>
<li>
<span id="messageError" class="error-message" style="display:none;">Please enter the message.</span>
</li>
<li>
<asp:Literal ID="litMessage" runat="server"></asp:Literal>
</li>
<li>
<asp:Button CssClass="button" ID="btnSend" runat="server" Text="Send" OnClientClick="return validate()" />
</li>
</ul>
</div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script>
$(document).ready(function() {
RelatedProducts.addGap();
});
</script>
</asp:Content>
這裏是基礎模板:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Base.master.cs" Inherits="GreenHill.masterpages.Base" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Greenhill Timbers</title>
<asp:contentPlaceholder id="head" runat="server" />
<link rel="stylesheet" type="text/css" href="/css/global.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script src="/scripts/navigation.js" type="text/javascript"></script>
<script src="/scripts/tinker.js" type="text/javascript"></script>
<script type="text/javascript" src="/scripts/jcarousellite_1.0.1.pack.js"></script>
<script type="text/javascript" src="/scripts/captify.tiny.js"></script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f07fd7a7ce8f226"></script>
<script type="text/javascript">
//jCarouselLite
$(function() {
$(".slider").jCarouselLite({
//btnNext: ".next",
auto: 3000,
visible: 1,
speead: 1000
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="top-nav">
<!--Contact Us | Sitemap | Example-->
</div>
<div class="brown-border"></div>
<div class="header">
<img class="logo" src="/images/GH_Top_Logo.png" />
<asp:Repeater ID="rptNav" runat="server" OnItemDataBound="rptNav_DataBound">
<HeaderTemplate>
<ul class="main-nav">
<li><a href="/" class="<%= HomeLinkClass %>">Home</a></li>
</HeaderTemplate>
<ItemTemplate>
<li class="separator">|</li>
<li>
<asp:HyperLink ID="linkPage" runat="server">
<asp:Literal ID="litPageTitle" runat="server"></asp:Literal>
</asp:HyperLink>
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
</div>
<div class="brown-border"></div>
<div class="main-outer">
<div class="main">
<asp:ContentPlaceHolder ID="content" runat="server">
</asp:ContentPlaceHolder>
<div class="footer-logo">
<img src="/images/GH_Stamp_Footer.png" />
</div>
</div>
<p class="footer">© 2011 GREENHILL TIMBERS P/L | 170 Settlement Road, Thomastown 3074 Australia | P. 03 9465 9875 | <a class="footer-link" href="mailto:[email protected]">[email protected]</a></p>
</div>
</form>
</body>
</html>
終於有default.master模板:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="default.master.cs" Inherits="umbraco.presentation.masterpages._default" %>
<asp:ContentPlaceHolder ID="ContentPlaceHolderDefault" runat="server">
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id="content" runat="server">
</asp:ContentPlaceHolder>
謝謝,但這並沒有解決我的問題。當我做出這個改變時,它吐出一個關於有多個服務器端表單標籤的錯誤,所以我從聯繫我們模板中刪除了表單標籤,因爲在Base中有一個。但同樣的錯誤出現。 – user1402677
不工作的頁面是這一個:http://greenhilltimbers.com.au/contact-us.aspx – user1402677
@ user1402677它看起來像它的工作。你有沒有找到解決辦法? – trnelson