asp.Netバックグラウンドでフロントheadにjs、css参照を追加する操作
6817 ワード
HtmlGenericControl js
=
new
HtmlGenericControl(
"
script
"
);
js.Attributes[
"
type
"
]
=
"
text/javascript
"
;
js.Attributes[
"
src
"
]
=
"
js/jquery.validate.js
"
;
HtmlGenericControl mes
=
new
HtmlGenericControl(
"
script
"
);
mes.Attributes[
"
type
"
]
=
"
text/javascript
"
;
mes.Attributes[
"
src
"
]
=
"
js/jquery.validate.messages_cn.js
"
;
HtmlMeta meta1
=
new
HtmlMeta();
meta1.Name
=
"
keywords
"
;
meta1.Content
=
"
L****
"
;
HtmlMeta meta2
=
new
HtmlMeta();
meta2.Name
=
"
description
"
;
meta2.Content
=
"
********
"
;
Page.Header.Controls.Add(js);
Page.Header.Controls.Add(mes);
Page.Header.Controls.Add(meta1);
Page.Header.Controls.Add(meta2);
//
:
HtmlGenericControl mes
=
new
HtmlGenericControl(
"
"
);
mes.Attributes[
"
"
]
=
"
**
"
;
mes.Attributes[
"
"
]
=
"
***
"
;