我注意到一些ASP.NET页面有<%$ sometext%>在他们中。有人可以在几句话中解释一下这个问题,还是指引一下语法参考?
解决方法
ConnectionString="<%$ ConnectionStrings:sqlconnection %>"
这是一篇很好的文章,解释了所有的内联表达式:
http://support.microsoft.com/kb/976112
The expression builder is used to set values of control properties based on the information that is contained in an application’s configuration or resource files. The following is the basic Syntax of the expression builder:
<%$ Expression Prefix: Expression Value %>
The dollar sign ($
) indicates to ASP.NET that the following expression is an expression builder. The expression prefix defines the kind of expression,such as AppSettings,ConnectionStrings,or Resources. Additionally,you can create and define your own expression builder. The expression value that follows the colon (:
) is what ASP.NET will actually use as the value of a certain property.
原文地址:https://www.jb51.cc/aspnet/253768.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。