首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

套用MasterPage的页面,怎么导入CSS样式表

2012-02-24 
套用MasterPage的页面,如何导入CSS样式表套用MasterPage的页面,就 asp:Content IDContent1 ContentPla

套用MasterPage的页面,如何导入CSS样式表
套用MasterPage的页面,
就 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>

用 <link href=""/> 页面报错。。

How can I do it?

[解决办法]
HtmlGenericControl script = new HtmlGenericControl("script");
script.Attributes.Add("type", "text/javascript");
script.Attributes.Add("src", ResolveUrl("~/js/jquery.js"));

this.head.Controls.Add(script);

script = new HtmlGenericControl("script");
script.Attributes.Add("type", "text/javascript");
script.Attributes.Add("src", ResolveUrl("~/js/facebox.js"));

this.head.Controls.Add(script);

script = new HtmlGenericControl("script");
script.Attributes.Add("type", "text/javascript");
script.Attributes.Add("src", ResolveUrl("~/js/function.js"));

this.head.Controls.Add(script);

动态直接操作 文件路劲直接写基于更目录的

热点排行