My fantastic Webdings Logo

Reamped.NET

It's not that bad


LINQ Distinct, a DataTable and the IEqualityComparer<T>

In a recent situation I was trying to pull some aggregates out of a DataTable using LINQ. I needed to get the rows of the DataTable with a Distinct clause, but my aggregates would be on other columns of the row. The problem is that when you call LINQ's Distinct() extension method with no argum... [More]

Strongly Typed Dynamic User Controls

A short time ago I was confronted with a serious problem. What I needed to do was dynamically choose a UserControl as well as fire methods from that UserControl. The problem lies in the fact that a UserControl does not implement my custom methods that I needed for my controls. Each control was simil... [More]

Using The Event Model: Throwing and Handling Custom Events

If you haven't tried using the event model in .NET you don't know what you're missing. If this is the case, then I'm glad you're here. Events are a very nice way to add flexibility to your projects. You can use them for a variety of things including validation and log... [More]

Clean Up ASP.NETs Head Tag With ControlAdapters

Ok, if you're anything like me you absolutely gag when you see the rendered content of the ASP.NET head tag. It is all rendered out inline for some reason. I'm not 100% sure about the affects of it on web marketing, but I know one thing is for sure... It certainly doesn't help your ran... [More]

Update Multiple DataBound DetailsViews With a Single Event

So I was stuck in a scenario where I needed to have multiple DetailsViews run an update command at the same time. I thought through it in my head saying to myself, "How do I click two update buttons at once?". Wouldn't it be nice if I could have a single button click event and have b... [More]

Objects Containing Objects and the ObjectDataSource

Ok, I ran into a major problem not so long ago. This problem stemmed from a DataObject that had a child object within it, here in referred to as a "complex object". When I put an ObjectDataSource on my page and bound to my business layer with my complex DataObject, for some reason only t... [More]

Creating ASP.NET Ajax Aware Server Controls

Lately, I have been having to deal with finding ASP.NET Ajax when creating server controls. It is actually quite simple to do, and I think that if you are going to be coding server controls for ASP.NET you should definitely know how to do it. So in this post, we will go through embedding a javascr... [More]

Site Wide User Notification Server Control

Some of you may have read my previous post Creating a Simple Site Wide User Notification Pattern. Upon a revision round of thinking, I thought it may be better to actually have a server control. This would offer some significant advantages, the biggest one being that we could drop the BaseMasterPa... [More]

Implementing Interfaces: ICloneable and IComparable

A friend of mine was showing me about some common interfaces and some good use cases for them the other day. A discussion arose of how to accurately create a deep copy of an object and the best way to go about it. Shortly after that discussion we got into the Sort() method and how to dictate how t... [More]

Creating a Simple Site Wide User Notification Pattern

When creating websites, it seems that one problem I always run into is how to gracefully notify the user of errors or display messages to them. In most of my sites I use master pages, so I thought it would be pretty sweet to integrate a messaging pattern into my master pages. I also wanted a quick... [More]