在MVC中将web.config页面中的添加键值调用到母版页(_layout.cshtml) [英] Call the add key values from web.config page to master page(_layout.cshtml) in MVC

查看:237
本文介绍了在MVC中将web.config页面中的添加键值调用到母版页(_layout.cshtml)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将MV.config页面中的添加键值调用到MVC中的母版页(_layout.cshtml)



我尝试过:



在MVC中调用web.config页面中的添加键值到主页面(_layout.cshtml)

解决方案

如何调用add从web.config到javascript(.js)文件的关键值? [ ^ ]



这是同样的事情,只是为配置数据的模型添加属性和



 var x ='@ Model.MyConfigProperty'; 


Call the add key values from web.config page to master page(_layout.cshtml) in MVC

What I have tried:

Call the add key values from web.config page to master page(_layout.cshtml) in MVC

解决方案

How to call add key values from web.config to javascript(.js) file ?[^]

It's the same thing, just add a property to the model for the config data and

var x = '@Model.MyConfigProperty';


这篇关于在MVC中将web.config页面中的添加键值调用到母版页(_layout.cshtml)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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