【发布时间】:2009-09-28 14:44:58
【问题描述】:
我正在努力熟悉 ASP.NET 上的 MVC。我有我的 global.asax
routes.MapRoute("Dept", "Dept/Invoice/{Category}/{Name}",
new {controller = "Dept", action = "Invoice", Category = "", Name = ""});
Controller.cs 代码获取数据并将其放入一个表格中,这很好。我的 html 开始...
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BMICPolicy.Dept>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link rel="Stylesheet" type="text/css" href="../../Content/Test.css" />
<html xmlns="http://www.w3.org/1999/xhtml">
样式表 -
body
{
font-family: Arial, Verdana, Book Antiqua, Sans-Serif;
font-size: 12px;
width: 100%;
height: 100%;
min-height: 100%;
text-align: center;
text-align: -moz-center;
padding: 0px;
margin: 0px;
position: relative;
}
table
{
border: solid 1px #000000;
border-collapse: collapse;
}
table td
{
padding: 5px;
border: solid 1px #000000;
}
table th
{
padding: 6px 5px;
background-color: #729FCB;
border: solid 1px #000000;
text-align: center;
}
thead
{
/*font-size: medium;*/
font: large, bold;
text-align: center;
}
我不确定为什么样式表仅在我输入“类别”时才有效,而当我在地址栏中键入名称时我的样式表完全被忽略(正文字体样式、表格、td、th、thead、等等...)。我错过了什么吗?
【问题讨论】:
-
我特意澄清了正在发生的事情......并且包括我的样式表
-
您确定当您输入一个名称时,您的服务器日志中没有为样式表请求提供 404?
标签: c# asp.net html asp.net-mvc