问题描述:

Placing the following code inside the 'markup' section on a web form does not work

Have I messed the syntax up or is something like this not possible on 'server side' controls?

<asp:TextBox runat="server" ID="txt" Text='<%#System.Configuration.ConfigurationManager.AppSettings["foo"] %>' />

网友答案:

Use $ expression.

<asp:TextBox 
       runat="server" 
       ID="txt" 
       Text='<%$ AppSettings: foo %>'
相关阅读:
Top