Milestone Reached; Custom Expression Builders Rock

I reached a milestone yesterday when I finished rewriting the labs for my new ASP.NET 2.0 course to run on build 40607–the build that went out to the public as beta 1.

This morning I wrote a fun new demo for the course’s introductory session–a demo that uses a custom expression builder to implement a new $ expression. $ expressions are new in ASP.NET 2.0. They allow you to load connection strings, resources, and other items using declarative expressions like this one:

<%$ ConnectionStrings:Northwind %>

What’s cool is that is that you can define prefixes of your own by mapping them to custom expression builders, which are little more than classes derived from System.Web.Compilation.ExpressionBuilder. My custom expression builder supports expressions like this one, which returns a string reflecting the major and minor version numbers of the version of ASP.NET it’s running on:

<%$ Version:MajorMinor %>

You can replace “MajorMinor” with “All” and get the major and minor version numbers plus build and revision numbers:

<%$ Version:All %>

When you think about it, custom expression builders offer lots of interesting new possibilities. Can you spell E-X-T-E-N-S-I-B-I-L-I-T-Y?

Stay Informed

Sign up for the latest blogs, events, and insights.

We deliver solutions that accelerate the value of Azure.
Ready to experience the full power of Microsoft Azure?

Atmosera is thrilled to announce that we have been named GitHub AI Partner of the Year.

X