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
查看全文
相关阅读:
获取有关控件的坐标
Android PopupWindow的使用和分析
Android RecyclerView 使用完全解析 体验艺术般的控件
TextView中显示价格并且中间直接有一个横线
Android Studio
移动开发】Android中三种超实用的滑屏方式汇总(ViewPager、ViewFlipper、ViewFlow)
Android中visibility属性VISIBLE、INVISIBLE、GONE的区别
理解Java的IO流 2015年8月6日 21:30:38
算法导论学习随笔——第七章 快速排序
oj 1031 random permutation
原文地址:https://www.cnblogs.com/yiki/p/1393987.html
最新文章
开篇、注释、基本数据类型、常量变量、命名
位运算
函数
printf不同格式表示法
运算符(赋值、自增自减)、表达式、语句、优先级表
逻辑(if)、关系、数字、条件运算符
scanf
赋值标志量时注意点
hausaufgabe--python 14- Functions for Strings
hausaufgabe--python 13-Tuple
热门文章
hausaufgabe--python 12-List comprehensions
hausaufgabe--python 11-List slice
hauseaufgabe--python 10
hausaufgabe-python 09
Hausaufgabe--Python 08
Hausaufgabe--Python 06
Hausaufgabe--Python 05
Hausaufgabe--Python 04
convertView&setTag方法的一点理解
TextView的setCompoundDrawables不显示问题解决
Copyright © 2011-2022 走看看