I think that ASP.NET MVC is a huge step forward from ASP.NET Web Forms. Still, there are some parts of it that are disappointing. One is the SelectList constructor, that doesn’t use generics and has string parameters for field selection. To create a SelectList from an IEnumerable<> we would do something like this. IEnumerable<Person> people… Continue reading Type Safe SelectList Factory
Author: Anders Abel
jQuery UI Replacement for alert()
The Javascript alert(message) is a simple one-liner to show a message on a web page. It uses a standard system dialog box to display the message. On a site where most other UI elements are built using jQuery UI it is more natural to display the alerts in the same style. Unfortunately there is no… Continue reading jQuery UI Replacement for alert()
Catch Errors in ASP.NET MVC Views
The compiler is my friend. It helps me check for simple spelling mistakes and alerts me when a change in one part of the code base breaks a reference somewhere else. When developing in ASP.NET Web Forms I have had a hard time with the lack of compilation of aspx pages. As long as the… Continue reading Catch Errors in ASP.NET MVC Views
Estimating Times
If you’re reading this, you’re probably a developer. Being a developer myself and having worked with developers I know that one of the most dreaded questions for a developer is about time: How long time will it take to implement this? Most developer hates that question, simply because it is so hard to answer. Programming… Continue reading Estimating Times
Disposable Base Class
I have covered the IDisposable interface in my previous posts IDisposable and using in C# and Implementing IDisposable. To make the implementation of IDisposable easier, I have written an abstract base class that handles the details of the IDisposable pattern. The objectives of the class is to: Provide a simple, reusable implementation of the disposable pattern. Pass all… Continue reading Disposable Base Class