I'm always trying to jack up controls with shortcuts like:
<asp:Label id="Label1" runat="server" Text="<%= CurrentUserName %>" />
You could use "#" instead of the "=", but that requires a databind.
A new feature in ASP.NET 2.0 to handle this is Expression Builders. Expression builders allow for some pretty interesting interaction with the ASP.NET compilation model.
For example, new to ASP.NET 2.0 is the ability to reference appSettings declaratively. Lets say you wanted the text of a button to be based on a value in the appSettings section of your web.config. Piece of cake:
<asp:Button id="cmdSubmit" runat="server" Text="<%$ appSettings: ButtonText %>" />
This is made possible by the built in AppSettingsExpressionBuilder. Lets say you wanted to display a localizable string, which is stored as a resource. In ASP.NET 1.1 it was sort of a pain. No longer:
<%$ resources: ResourceKey %>
That's the ResourceExpressionBuilder hard at work. Nice!
There's also a ConnectionStringExpressionBuilder so you can refer to Connection Strings defined in the new connection strings section in the web.config. That is extremely helpful when working with the new declarative data controls:
<asp:SqlDataSource id="data1" runat="server" ConnectionString="<%$ ConnectionStrings: MyConnectionString %>"/>
Pretty useful. How about writing your one to do something like:
<asp:CheckBox id="chk1" runat="server" Text="<%$ Code: DateTime.Now %>"/>
Get the code and more details at:
http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx
A great example: http://www.hintsandtips.com/ShowPost/456/hat.aspx