我正在研究一个项目,我最近接手了,安装了Umbraco CMS(4.7.1)并用ASP.net编写,我不确定我是什么这样做并且卡住了。
CSS不会出现在一个页面上,即ContactUs页面(contact-us.aspx),但CSS在其他任何地方都显得非常好,我觉得这很奇怪。
所以我的问题是我需要做些什么才能让CSS出现在这个页面上,就像其他人一样?
以下是contact-us模板:
<%@ 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:info@greenhilltimbers.com.au">info@greenhilltimbers.com.au</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>
答案 0 :(得分:0)
你有:
MasterPageFile="~/umbraco/masterpages/default.master"
这意味着您的“联系我们”页面继承自默认的Umbraco母版页,而不是您的基本母版页。
我刚刚在打字时意识到你的问题已经过了一周,但无论如何我都会回答。 :)