zoukankan
html css js c++ java
Header中添加/title/Meta tages/CSS
设置Title :
this
.Header.Title
=
"
Title PAGE
"
;
如果用了MasterPage可以这样用:
this
.Page.Title
=
SiteMap.CurrentNode.Title;
动态设置Style:
Style style
=
new
Style();
style.ForeColor
=
System.Drawing.Color.Navy;
style.BackColor
=
System.Drawing.Color.LightGray;
//
Add the style to the header for the body of the page
this
.Header.StyleSheet.CreateStyleRule(style,
null
,
"
body
"
);
动态加样式表:
HtmlLink link
=
new
HtmlLink();
link.Attributes.Add(
"
type
"
,
"
text/css
"
);
link.Attributes.Add(
"
rel
"
,
"
stylesheet
"
);
link.Attributes.Add(
"
href
"
,
"
~/newstyle.css
"
);
this
.Header.Controls.Add(link);
动态加meta tags :
//
Render: <meta name="keywords" content="Some words listed here" />
HtmlMeta meta
=
new
HtmlMeta();
meta.Name
=
"
keywords
"
;
meta.Content
=
"
Some words listed here
"
;
this
.Header.Controls.Add(meta);
//
Render: <meta name="robots" content="noindex" />
meta
=
new
HtmlMeta();
meta.Name
=
"
robots
"
;
meta.Content
=
"
noindex
"
;
this
.Header.Controls.Add(meta);
//
Render: <meta name="date" content="2006-03-25" scheme="YYYY-MM-DD" />
meta
=
new
HtmlMeta();
meta.Name
=
"
date
"
;
meta.Content
=
DateTime.Now.ToString(
"
yyyy-MM-dd
"
);
meta.Scheme
=
"
YYYY-MM-DD
"
;
this
.Header.Controls.Add(meta);
来源:
http://hi.baidu.com/hehuayuan/blog/item/134f1808dc0159d663d98655.html
查看全文
相关阅读:
纳维-斯托克斯方程 据说 很牛 ?
霍奇猜想
关于 四色定理 和 霍奇猜想
我给出了一个 四色定理 的 证明
在 兄弟们我挡不住了 中 的 回复 续
在 兄弟们我挡不住了 中 的 回复
在 没什么思路,帮解答下,谢谢 中 的 回复
在 10元悬赏 中 的 回复
在 大家的做题热情实在是高 故开新帖继续做题 中 的 回复
做一道 高一 求 函数 值域 的 题
原文地址:https://www.cnblogs.com/yiki/p/1393987.html
最新文章
Til the Cows Come Home
哈密顿绕行世界问题
Avito Code Challenge 2018 D. Bookshelves
D. Fair
C. Three displays
B. High School: Become Human
codeforces acito code challengeC. Useful Decomposition
Bomb 【数位dp】
2008
2007
热门文章
2006
2005
2002
2004
2003
2001
2000
腾讯安全实习生在线笔试
人造卫星轨道 和 天体轨道 原理
关于 不可压缩粘性流体 和 NS 方程
Copyright © 2011-2022 走看看