My fantastic Webdings Logo

Reamped.NET

XML Thingey... It's a Technical Term


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 similar and would have the same methods but it would have different display characteristics.   That was when I had a small epiphany. Why can't I just make an abstract base class? Well the answer is you can! Som... [More]

Using Database Projects for Visual Studio

Do you use database projects in Visual Studio? If not, then now is a good time to start. It is the best way I have found to source control my databases without actually sticking the database file itself in the repository. It is very simple to add to your solution and creates a default directory structure for your create scripts, change scripts and queries. Best of all the project will be recognized by source control and added to the source code repository. This means you can keep versioned scripts for maint... [More]

Why VisualSVN 1.4 Is So Great

So after the installation of VisualSVN 1.4, I don't think I'll ever look back. Finally a version of Visual Studio source control integration to make me leave the realms of Visual Source Safe forever. Now VisualSVN has put all the most important commands one click away. Not to mention, they added a couple things to make life a little easier for SVN newbies like myself.   Here we will go over some of my favorite new features added to this newest release. If you are familiar with the S... [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 logging. You can think of an event as sort of an All Points Bulletin (APB) throughout your application. Once you declare and throw an event, every place in your code that has an event handler for that event wil... [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 rankings any. At the very least it looks gross and it can be easily fixed with some portable c# files that you can include in any project. I found a reference here about it, so I picked it up and ran with it. ... [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 both DetailsView controls update at the same time? I tried simply calling the .Update() method of the ObjectDataSouce controls they were bound to and it didn't work. So I had one last thought, wouldn't it ... [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 the simple properties would show up. Simple properties being those that are passed by value and of a .NET system type. My custom typed property never shows up in my data bound control. Hmmmmm...   ... [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 javascript file into your assembly and then registering it to the page. Then I will show you how to find out if ASP.NET Ajax is loaded during the script registration and also how to find out if ASP.NET Ajax is loaded in... [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 BaseMasterPage. Having the control be a strongly typed server control, we could find it on the page by it's type. We would also only have one place to go to maintain the code, rather than digging through a user controls ... [More]

Creating Namespaces Within Your JavaScript

Have you ever worked on a project that had a ton of Javascript in it? Not only that, but let me add that the project also made no good use of a Javascript framework. A lot of times when working in a project rich in Javascript, I find functions just defined all over the place without any rhyme or reason. Sometimes it is hard to judge if you are re-defining a function or not. This can get quite hairy, especially without the use of a tool that supports Javascript intellisense such as Visual Studio 2008. If y... [More]