我通过在主页面中添加标题占位符并在内容页面中明确指定css来做到这一点.
在大师:
<head runat="server">
<title></title>
<link href="~/css/common.css" rel="stylesheet" type="text/css" />
<!-- loads of other stuff / -->
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
Run Code Online (Sandbox Code Playgroud)
并在内容中:
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link href="../css/SomeContent.css" rel="stylesheet" type="text/css" />
<script src="../js/SomeJsToo.js" type="text/javascript"></script>
</asp:Content>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8675 次 |
| 最近记录: |