All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
构建安全的Xml,Web,Service系列(一)_[Asp.Net教程]
PHP5中的this,self和parent关键字详解_php资料_编程技术
Apache伪静态html(URL Rewrite)设置法_[PHP教程]
PHP和JS实现普通HTTP上安全地传输密码_[PHP教程]
AjaxPro与服务器端交互过程中如何传值_[AJAX教程]
用php实现gb2312和unicode(UTF-8)间的编码转换_php资料_编程技术
select控件在Mozilla和Opera中的问题_JavaScript技术_编程技术
C#教程:.NET Framework简介
VS2005开发中Timer控件失效的解决方法_.net资料_编程技术
一个容易忽视的存储过程问题_[SQL,Server教程]
Reading number is top 10 pictures
Distribution of wealth in China survey status report
Seductive beauty of crime1
谁认识这位校花
The household of rural style is designed
I also want to live a June 1 children's day, dad
漂亮脸蛋魔鬼身材1
9.3阅兵全景图8-航空梯队
中国处女图鉴2
Take you to walk into the most true north Korea rural3
Tie a large font of mouse
Download software ranking
Tram sex maniac 2 (H) rar bag2
Boxer's Top ten classic battle8
Boxer's Top ten classic battle2
C++教程第四版
Unix video tutorial7
功夫熊猫2(下集)
Macromedia Dreamweaver 8
功夫熊猫2(上集)
asp.net技术内幕
Tram sex maniac 2 (H) rar bag10
delv published in(发表于) 2014/1/6 9:03:06 Edit(编辑)
Asp.net关于Header/title/Meta,tages/Style操作的小技巧_[Asp.Net教程]

Asp.net关于Header/title/Meta,tages/Style操作的小技巧_[Asp.Net教程]

Asp.net关于Header/title/Meta tages/Style操作的小技巧_[Asp.Net教程]

收集一些偶然看到的小Tips,先列一些在这儿,慢慢补充。


设置Title : this.Header.Title="这是个Title测试";
如果用了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:
HtmlMeta meta = new HtmlMeta();
meta.Name = "keywords";
meta.Content = "Some words listed here";
this.Header.Controls.Add(meta);


// Render:
meta = new HtmlMeta();
meta.Name = "robots";
meta.Content = "noindex";
this.Header.Controls.Add(meta);


// Render:
meta = new HtmlMeta();
meta.Name = "date";
meta.Content = DateTime.Now.ToString("yyyy-MM-dd");
meta.Scheme = "YYYY-MM-DD";
this.Header.Controls.Add(meta);







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.