Sunday, December 03, 2006 8:10 PM
by
dodyg
Custom Expression Builders
"One of the hidden gems in ASP.NET 2.0 is the new expression syntax.
For example, to display the value of a setting in the AppSettings
section of your web.config, you can do this: <asp:Label Text="<%$ AppSettings:AnotherSetting %>"
ID="setting"
runat="server" />
Notice that the value of the Text property of the Label
control is set to an expression that is similar to the DataBinding
syntax (<%#), but instead of a pound sign (#) it uses a dollar sign
($)." (haacked)
I implemented a code expression builder before so that I can use things like <%$ code: GetResult() %> in my template