如何使用的鍵值是我的web.config中直接從asp.net網頁即使用<%$%>Web.config文件的appSettings
3
A
回答
1
我覺得
<%$Appsettings:KeyName %>
應該做你需要的。
這將使用此http://www.4guysfromrolla.com/demos/printPage.aspx?path=/articles/022509-1.aspx
2
<%= ConfigurationManager.AppSettings["key_name"] %>
0
<%= ConfigurationManager.AppSettings["mySetting"] %>
4
的描述請參見ASP.Net Expressions Overview
實例從頁面
的Web.config AppSettingsExpressionBuilder
...
<appSettings>
<add key="copyright" value="(c)Copyright 2004 Northwind Traders"/>
</appSettings>
然後你可以使用...
<%$ AppSettings: copyright %>
相關問題
- 1. 的Web.config轉換語法的appSettings文件
- 2. 的Web.Config <文件的appSettings =「」>問題
- 3. Web.config和Web.Release.config中的appSettings
- 4. 在web.config中加密appSettings
- 5. ASP.NET web.config appsettings持久性
- 6. Web.config appSettings configSource屬性轉換
- 7. 在其他Web.config文件中使用appSettings的值
- 8. NLog - 從web.config中的appsettings配置日誌文件名
- 9. 是否可以在web.config文件中本地化appSettings信息?
- 10. 在幾個web.config文件中拆分'appSettings'部分
- 11. 在web.config文件加密<appSettings>標籤
- 12. web.config文件中缺少一個<appsettings>
- 13. AppSettings vs applicationSettings的優缺點(.NET app.config/Web.config)
- 14. 從Angular js 2 Typescript訪問web.config appsettings
- 15. 訪問web.config attibutes(而不是appSettings)
- 16. 是否有NLog LayoutRender獲取web.config appSettings項?
- 17. Web.Config將各個AppSettings轉換爲ConfigSource
- 18. web.config轉換 - appSettings節點不轉換
- 19. 授權屬性MVC 3&Web.Config AppSettings值
- 20. 什麼創建了Web.config appSettings條目?
- 21. 從子網站讀取AppSettings web.config
- 22. ASP.Net html文件中的AppSettings
- 23. 在appsettings中設置電子郵件設置web.config
- 24. 在運行時的web.config的AppSettings(Active Directory的AUTH)
- 25. wcf web.config文件
- 26. 嵌套的appSettings有文件屬性
- 27. 訪問Custom.Configuration文件中的AppSettings(CS0122)
- 28. 連接到從的Web.Config <appSettings>部C#數據庫/ MVC
- 29. 更改基於全球化設置的web.config appsettings
- 30. 你可以在web.config的其他部分使用appSettings鍵嗎?