如何通过从Asp.net MVC4中的下拉列表中选择主题来动态应用主题? [英] How to apply the themes dynamically by selecting the theme from the dropdownlist in Asp.net MVC4?

查看:100
本文介绍了如何通过从Asp.net MVC4中的下拉列表中选择主题来动态应用主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

      apply    主题 动态  by  选择   主题 来自       Asp  net  MVC4?  想要    apply    主题  on  选择

解决方案

不是确切的解决方案但是仍然值得一看:

ASP.NET MVC动态主题 [ ^ ]

您可以根据需要自定义代码。



除此之外,您可以使用 jQuery的。为每个主题创建不同的 .css 文件,并根据选择,加载页面的主题。

请参阅,

 


。changeStyle )。click(function(e){
e.preventDefault();
var style =


this )。attr( 数据式);

How to apply the themes dynamically by selecting the theme from the dropdownlist in Asp.net MVC4? I want to apply the theme on selection.

解决方案

Not the exact solution but still it's worth to look:
ASP.NET MVC Dynamic Themes[^]
You can customize the code as per your need.

And apart from this, you can do it using jQuery. Create the different .css files for each theme and based on the selection, load the theme for the page.
See,


(".changeStyle").click(function (e) { e.preventDefault(); var style =


(this).attr("data-style");


这篇关于如何通过从Asp.net MVC4中的下拉列表中选择主题来动态应用主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆