:::: MENU ::::

Thursday, August 27, 2009

Introduction The .NET Framework is big. Really big. The System.Web assembly, which contains the guts of ASP.NET, is comprised of nearly 2,000 types, over 23,000 methods, and more than 12,500 properties. And that's not counting any of the functionality added to ASP.NET since version 2.0. ASP.NET AJAX, the ListView control, Dynamic Data, URL routing, and other features add hundreds of new types and thousands of new methods and properties. Given...

Wednesday, August 26, 2009

Refactoring is an integral part of continually improving your code while it moves forward through time. Without refactoring you accrue technical debt, forget what portions of code do and create code that is resistant to any form of testing. It is an easy concept to get started with and opens the door to much better practices such as unit testing, shared code ownership and more reliable, bug-free code in general. Because of the importance of refactoring,...

Thursday, August 20, 2009

There was a question about this on the Asp.Net forums and after a quick search I didn't find a good generic function so I thought I'd supply one. Note: I wanted this to be as broad and useful as possible, so the second parameter is a ListControl which both the ListBox and DropDownList inherit from. I also made sure the function would handle enums that had non-contiguous values that didn't necessarily start at zero. // ---- EnumToListBox ------------------------------------...

Monday, August 10, 2009

Yesterday evening at work a team member and I were pair programming.  We had a disagreement about how to code a few lines.  The question was around whether to use the ?? operator or to use an if statement using String.IsNullOrEmpty.  We settled it like most developers do and that is with a benchmark.  Here’s the fun we had. To give you an idea as to what we were doing here’s some context.  We had a function that took an...

Monday, August 3, 2009

Here's one thing that that irritates me to no end - the way IIS and ASP.NET inheritance works down from a root directory into child directories. I started a new project today and immediately I was greeted by about 15 configuration errors. Like this: Server Error in '/WebStore2008' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review...