保存“字符串”在Web.config的层次结构中 [英] Save "strings" in the hierarchy of Web.config
本文介绍了保存“字符串”在Web.config的层次结构中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Web.config中,我可以使用以下语句在我的aspx文件中调用我的连接字符串connstring:
<%$ ConnectionStrings:connstring %>
我在aspx文件中看到过其他类似的东西,例如:
< ;%#name%>
我想知道你是否也可以在Web.config的层次结构中保存字符串还?
解决方案
ConnectionStrings:connstring%>
我见过其他类似的东西在aspx文件中,例如:
<%#name%>
I想知道你是否也可以在Web.config 的层次结构中保存字符串?
这里有一些理论:
http://msdn.microsoft.com/en-us/library/2tw134k3.aspx [ ^ ]
这里有一个很好的示例:
http://msdn.microsoft.com/en-us/library/system.configuration.configurationcollectionattribute.aspx 一> [ ^ ]
当然在appsettings中;)
看看那里: http://odetocode.com/articles/345.aspx [ ^ ]
In Web.config I can call on my connection string "connstring" in my aspx file by using this statement:
"<%$ ConnectionStrings:connstring %>"
I have seen other similar things used in aspx files like:
"<%# "name" %>"
I was wondering if you could also save "strings" in the hierarchy of Web.config also?
解决方案
ConnectionStrings:connstring %>"
I have seen other similar things used in aspx files like:
"<%# "name" %>"
I was wondering if you could also save "strings" in the hierarchy of Web.config also?
There is some theory here:
http://msdn.microsoft.com/en-us/library/2tw134k3.aspx[^]
And a good sample here:
http://msdn.microsoft.com/en-us/library/system.configuration.configurationcollectionattribute.aspx[^]
In the appsettings, of course ;)
Take a look there : http://odetocode.com/articles/345.aspx[^]
这篇关于保存“字符串”在Web.config的层次结构中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文