Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 mvc3 c#。配置管理器中的 appsettings 在控制器中运行良好。但我想在我的 jquery 中使用这些常量。
有没有办法在 jQuery 中使用 ConfigurationManager.AppSettings?
提前致谢。
希望这对你有用:
var appSetting = '@(System.Configuration.ConfigurationManager.AppSettings["Test"].ToString())'
Test您要访问的密钥在哪里
Test