日期:2014-05-19  浏览次数:20394 次

Master的CSS问题
master文件:
  <link   rel=stylesheet   type= "text/css "   href= "../App_Themes/style.css "/>
注:若改 "../App_Themes/style.css "为 "~/App_Themes/style.css "
则立马在IDE中就看不到CSS效果了.改后调试一样CSS没效果.

aspx文件:
<%@   Page   Language= "C# "   AutoEventWireup= "true "     CodeFile= "index.aspx.cs "   Inherits= "GayzNetRegister "  
MasterPageFile= "~/Master/Index.master "   StylesheetTheme= "Client "   Title= "首页 "
%>
在IDE中也看得到CSS效果.

在调试时,就看不到了.
调试时,看了下网面的源文件:
<head>
<link   href= "App_Themes/Client/Client.css "   type= "text/css "   rel= "stylesheet "   />
<title> 首页 </title>
<link   rel= "stylesheet "   type= "text/css "   href= "App_Themes/style.css "   />
</head>

第一个是系统根据StylesheetTheme= "Client "自己加的.
第二个是母版里的.
应该两个都用到了.
新手在这里请教了.

------解决方案--------------------
用Master Page在IDE环境下确实有问题,我现在全部是直接编辑源代码。
------解决方案--------------------
不太清楚 正打算试这个用法呢
------解决方案--------------------
怎么解决的呀,也不说一下呀。
------解决方案--------------------
../App_Themes/style.css "为 "~/App_Themes/style.css "

lz的~运算符还没搞明白,~只对web控件有用