Expression Syntax: <%$ ... %> New in 2.0

ASP.NET 2.0 adds a new declarative expression syntax for substituting values into a page before the page is parsed. This is useful for substituting connection string values or application settings defined in a Web.config file for server control property values. It can also be used to substitute values from a resource file for locaization. More on connection string and resources expressions and expression handlers can be found in the Performing Data Access, Internationalizing Your Application and Extending ASP.NET sections.

<asp:SqlDataSource ID="SqlDataSource1" ConnectionString='<%$ connectionStrings:Pubs %>' 
runat="server" SelectCommand="sp_GetAuthors" /> <asp:Label ID="Label1" Text='<%$ Resources: ExchRate, ConvertLabel %>' runat="server"/>
ASP.NET 2.0学习笔记之$

相关文章:

  • 2022-02-17
  • 2021-08-17
  • 2021-10-02
  • 2021-04-01
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
猜你喜欢
  • 2022-03-03
  • 2022-01-11
  • 2022-01-01
  • 2021-10-24
  • 2021-06-20
相关资源
相似解决方案