Moving Beyond Enums

I just published an article on ASPAlliance on Moving Beyond Enums, describing when and how to move from enums to classes in your code when you start demanding more from your enums than they were designed to give.  Check it out and let me know what you think.  I also thought I’d post an alternate […]

Working with SimpleMembership outside of ASP.NET

I’m using SimpleMembership, from WebMatrix’s distribution(WebMatrix.WebData), with an ASP.NET MVC 3 application.  You can find the NuGet Package for SimpleMembership.Mvc3 here, and installing it is just a matter of running “Install-Package SimpleMembership.Mvc3” from the Package Manager Console in Visual Studio.  Unlike the built-in Membership and Role providers for ASP.NET, SimpleMembership doesn’t require huge swaths of […]

Validating Emails for System.Net.Mail

If you’ve worked with the System.Net.Mail API to send out messages, you may have run into the fact that when you add an email address to a message, it will sometimes throw an exception if the email doesn’t appear to be valid:

Result: FormatException – The specified string is not in the form required […]