惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
SecWiki News
SecWiki News
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
量子位
M
MIT News - Artificial intelligence
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
H
Heimdal Security Blog
腾讯CDC
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cybersecurity and Infrastructure Security Agency CISA
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Full Disclosure
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threatpost
月光博客
月光博客
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
T
Troy Hunt's Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
D
DataBreaches.Net
O
OpenAI News
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
小众软件
小众软件
V
Vulnerabilities – Threatpost
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
美团技术团队
P
Privacy International News Feed

博客园 - 露雨城市.NET2.0和Sql Server 2005开发研究

关于asp.net将动态页直接生成静态页的随笔(乱码) 我的神龙卡KTV点播软件只有一个遗憾了 关于清除Sql Server Express版本的数据库日志文件 关于微软2008技术预览大会南京站和Vista 也许是转折-放弃了5,6K的月薪 关于vs2005中ajax控件暴露模板中控件,请高手进来聊聊. - 露雨城市.NET2.0和Sql Server 2005开发研究 这个基础题,你能做对吗? 好久没有来发文章了,今天来秀一下。 在.NET2.0中如何更简单的使用委托将方法加载到事件中去 Visual C#中父窗口和子窗口之间实现控件互操作 关于如何在子窗口中选择后,在父窗口赋值并让输入框设为只读。 - 露雨城市.NET2.0和Sql Server 2005开发研究 我的新资源网站开张了,韩国模版,韩国设计资源等。 关于在插入的模版中如何为已绑定了Text属性的TextBox设置默认值 今天好高兴,通过了微软的Sql Server 2005的70-31的考试。 赠送一张微软免费考试券 关于GridView中选择当前行的问题。 VS2005中的一个小BUG:关于Dropdownlist无法Datadinding的解决方法。 讲故事谈.NET委托:一个C#睡前故事 关于的MasterPage和Theme的问题。
如何动态设置全局theme,及在web.config中读取pages节点的内容。
露雨城市.NET2.0和Sql Server 2005开发研究 · 2006-03-24 · via 博客园 - 露雨城市.NET2.0和Sql Server 2005开发研究

本来一直打算找到动态更新asp.net2.0的整个站点的theme设置的简便方法,一直没找到,现在还是用的老办法。每个页面都重写page.Theme = myPage.currentTheme;通过动态更新myPage.currentTheme这个全局变量来达到这个目的。

其中在web.config中设置了默认的Theme,其部分如下的配置节点:
<system.web>
    <pages theme="Default"/>
</system.web>
很多人不知道如何读取theme的值,可以看我以下的代码。

System.Web.Configuration.PagesSection ps = (System.Web.Configuration.PagesSection)System.Configuration.ConfigurationManager.GetSection("system.web/pages");

TextBox1.Text 
= ps.Theme;

我也希望有人能解决我的问题,谢谢。

posted on 2006-03-24 11:49  露雨城市.NET2.0和Sql Server 2005开发研究  阅读(5812)  评论()    收藏  举报