Friday, October 23, 2009

Exception-Driven Development

One of the first things I like doing when coding is ensuring a stable error logging and notification system. I like to know about problems as soon as or sooner than my customers. And detailed logging really helps in reproducing and fixing the bug. Jeff Atwood calls this exception-driven development.

Today I found ELMAH. In a little more than an hour I implemented it in a ASP.NET app that did not have any exception handling implemented. It logs, emails and has a error log viewer. The screencast made this so easy.

Thursday, October 22, 2009

Keeping my Monster Mash

My wife used JibJab to create monster mashups of our family. I wanted to make sure we could keep the videos. I used CamStudio to capture the video and audio into avi files. I used MediaCoder to convert the avi to mp4 so I don't have to keep the very large avi files.


I just spent a long time figuring out a bug. Normally I use ASP.NET server controls. I have been working with a more JavaScript. I had a button HTML element on the page. I narrowed it down to the fact that the page submitted and reloaded when it was not supposed to.

After I added a type="button" to the button element, it stopped refreshing. After finding this article on StackOverflow, I have decided to use an input element specifying type="button"

Wednesday, October 07, 2009

Using JQuery UI Dialog with ASP.Net and AJAX Update Panel

I ran into an issue using an ASP.NET UpdatePanel and the JQuery UI Dialog. I found the solution here.

When I put an update panel in the dialog, it stopped posting back to the server. It seems that JQuery moves the containing div of the dialog by appending it to the body. This puts it as the last element of the body, outside of the form element.

The fix was to use JQuery to append the dialog to the form.