In his recent blog post, A Quick Example of YAGNI, Jeremy Miller presents what is quite possibly the worst example of YAGNI I've ever read.
Continue reading "A Really Bad Example of YAGNI"
In his recent blog post, A Quick Example of YAGNI, Jeremy Miller presents what is quite possibly the worst example of YAGNI I've ever read.
Continue reading "A Really Bad Example of YAGNI"
Extraneous attributes. Default styles. Stray markup. Sometimes, ASP.NET server controls just don't render the way you want them to. Even in those cases where Microsoft is just trying to be "helpful", sometimes I just want them to get out of the way and let me do my thing. Here, I'll demonstrate a quick-and-dirty way to get rid of that extra markup, using the
Continue reading "Fixing ASP.NET Server Control Rendering Issues with Tag Mapping"
To take full advantage of all the great stuff the ListView has to offer, it's important to understand how to properly bind controls that are nested inside of it. Once you know how, it's easy to embed any data-bound control like DropDownLists, CheckBoxLists, and even other ListViews inside your ListView. Here, I'm going to demonstrate two different ways to do this.
Continue reading "Nested ListViews and More - Working with Databound Controls Inside the ListView"
It seems I’ve been recently called out regarding my October 16, 2008 post about those dreaded, so-called “CSS Friendly” Control Adapters.
Continue reading "Blog Etiquette - The Art of the Duel"
With ASP.NET MVC being the new hotness, some just can't resist the urge to proclaim that, all of a sudden, Webforms Suck. Well, some of us have been making a living on Webforms for years, and despite proclamations to the contrary, Webforms are still useful and are here to stay.
Continue reading "10 Reasons ASP.NET Webforms (Still) Rock"
Separating your application layers into class libraries offers several advantages, but one of the disadvantages is that you lose access to ASP.NET's dynamically-compiled ProfileCommon class, which provides strong-typing for profile properties. Here's how to regain the advantage of strongly typed profile properties in a class library.
Continue reading "Getting Strongly Typed Profile Properties From a Class Library"
In case you haven't noticed, the .NET world has been inundated with a flood of new technology over the last year or so -- first C# 3.0, followed quickly by the .NET 3.5 Framework, LINQ, ASP.NET Dynamic Data, the Entity Framework, ADO.NET Data Services, and soon, ASP.NET MVC.
And as I'm sure many of you have definitely noticed, the poor publishers have had a helluva time keeping up.
Continue reading "Books I Wish Would Just Come Out Already"
If you use roles in your ASP.NET application, by default ASP.NET queries the database with every page request in order to fetch the list of roles the current user belongs to. Considering the performance overhead that entails, it's surprising that so many developers forget to enable role caching in their applications.
Continue reading "Caching Roles For Better Site Performance"
Okay, nothing profound or earth-shattering, but I see this question asked so often in the forums that I figured I'd create a blog post about it. That way, the next time someone asks this question I can simply point them here. ;-)
Continue reading "How to Validate User Input With Values From a Database"
You may have noticed that in an ASP.NET application, whenever you access a property in a user's profile, the last activity date is automatically updated for that user. This may not the behavior you want, especially when you're dealing with users who are offline. Here's why it happens, and how to alter this default behavior.
Continue reading "How to Prevent Profile Properties From Updating a User's Last Activity Date"