在主页c#中使用特定条件动态设置主题

在主页c#中使用特定条件动态设置主题

本文介绍了在主页c#中使用特定条件动态设置主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

heyy ...





我的App_themes中有3个主题。主题将设置或在我的母版(源代码)调用

<链接HREF = ../ App_Themes文件/ FCRSThemes /主题/ theme2.css 的rel = stylesheettype =text / css/> 





我想在web配置文件中设置一个值,即..

< add key =Themevalue =1/> 





基于web配置中的键值,我想在母版页中设置主题..



我该怎么做?并希望代码写在master page.cs ....任何想法..?

解决方案


heyy...


I have 3 themes in my App_themes . The theme will set or call in my masterpage(source code) .

<link href="../App_Themes/FCRSThemes/theme/theme2.css" rel="stylesheet" type="text/css" />



I want to set a value in web config file ie..

<add key="Theme" value="1" />



based on the key value in web config, I want set the theme in master page..

How can I do this ? and want code to write in master page.cs.... Any idea..?

解决方案


这篇关于在主页c#中使用特定条件动态设置主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 16:02
查看更多