Thursday, July 21, 2011

Property based template parsing

The usage of string.Format is widely known and appreciated. It provides a simple and clean way to build parametrized strings. However, this method can become somewhat obscure when there is a large string (e.g. template) to be formatted. Sometimes lot of parameters are needed and all the parameter numbers make not much sense on a page sized string. In this case named parameters or template variable names would be desired.

Thursday, January 6, 2011

ASP.NET Compile Time Supported Validators

UPDATED VERSION

Click here for the latest blog.

With.NET 3.5 extension methods were introduced, these methods provide a great way built features into 'closed' objects or doing a way of IOC.

Either way, the following example shows the usages a 'simple' validation framework. It provides extensions to validate web controls with compile time support. Which is quiet nice if don't have to write any markup code anymore.