# Tuesday, April 1, 2008
 #
 

Today is the first day of the fourth month, which means you should not believe anything you hear, read or see between now and midnight.

I found a great listing of the greatest April Fools pranks in history, based on cleverness and the number of people duped: http://www.museumofhoaxes.com/hoax/aprilfool/

Tuesday, April 1, 2008 11:05:14 PM (GMT Daylight Time, UTC+01:00)
# Wednesday, March 26, 2008
 #
 

If you haven't yet seen Josh Holmes and Steve Loethen's Internet show Code To Live, I recommend doing so.  Josh and Steve (mostly Josh) travel around the country interviewing people who are passionate about the technology on which they are working.  The video production is sometimes a bit lacking but the viewer gets a feel for the excitement people have for the work they are doing and the interviews often provide brief overviews of new technologies.

You can view this show at www.codetolive.net or http://channel9.msdn.com/shows/code_to_live

Wednesday, March 26, 2008 7:43:24 PM (GMT Standard Time, UTC+00:00)
# Thursday, March 20, 2008
 #
 

The 'Heroes Happen Here' launch was well worth my time.  Not only did we get a chance to see demos of Microsoft's newest products, I also got a chance to meet up with many of the most energetic developers in the midwest.  About 50 of us headed to Greektown after the event for an after-event event.  You can view my photos of the day here.

At the end of the day, everyone walked off with (among other things) a copy of Visual Studio 2008.  I was excited because I had spent most of the day following the Developers Track, which outlined the features of the new Visual Studio.  I'll be installing it this weekend. 

I especially like the fact that I can install VS 2008 and work on applications using older .Net frameworks.  Framework versions 2.0, 3.0 and 3.5 are all available.  This mitigates the risk of upgrading and it means I don't need to install multiple versions of Visual Studio.  I can write code that targest .Net Framework 2.0 but still take advantage of the improvements in the IDE, such as client-side debugging, stylesheet troubleshooting, and built-in Ajax support.

My customer has decided to upgrade to Visual Studio 2008 but defer the decision to upgrade the framework on which we have built our applications.

Here is a list of new features in Visual Studio 2008:  http://msdotnetsupport.blogspot.com/2007/11/22-new-features-of-visual-studio-2008.html
      

Thursday, March 20, 2008 7:15:04 PM (GMT Standard Time, UTC+00:00)
# Monday, March 17, 2008

Tomorrow is the big Heroes Happen Here event in Detroit.

Microsoft is launching new versions of Visual Studio, Windows Server and SQL Server.  I'm looking forward to seeing the new tools and how to utilize these tools in my projects. 

I believe the Detroit sessions are full but it may be possible to attend the event without attending the sessions.  It will be held from 8AM - 5PM at the Marriott in the Renaissance Center downtown.  You can get more information at http://www.microsoft.com/heroeshappenhere/default.mspx

Supposedly, Quick Solutions is sending up a busload of consultants from Columbus to the event.

 

Monday, March 17, 2008 3:21:29 PM (GMT Standard Time, UTC+00:00)
# Saturday, March 1, 2008

My son's basketball season ended Friday night in the District Finals.  The game couldn't have been closer.  Jackson High led by 9 points late in the game when Pioneer came storming back to force overtime.  But, in the end Jackson won in the extra session to capture the District crown.  Pioneer ended its season at 22-1 - a great record by any standard.  But Friday night all the boys were focused on the 1 loss.

The next day, Nick was back in the gym working on his jump shot.  I'm already excited about next year.

Saturday, March 1, 2008 7:29:03 PM (GMT Standard Time, UTC+00:00)
# Saturday, February 23, 2008

I delivered the web security presentation yesterday for my customer.  This is the same presentation I delivered as part of the DevCares event last week.  It went much better due to the fact that I secured a much better laptop for the presentation.  

The presentation materials are available here.

Saturday, February 23, 2008 2:30:46 PM (GMT Standard Time, UTC+00:00)
# Thursday, February 21, 2008

Scott Mitchell has an excellent article on 4GuysFromRolla.com about how to use ASP.Net to prompt a user to save changes before leaving a page.  It is part of a series he wrote back in 2004 but it is still relevant today.  The only change you should make today is that he calls methods of the Page class (IsStartupScriptRegistered, RegisterClientScriptBlock, RegisterArrayDeclaration) and these methods are depcrecated and replaced by the same methods in the Page.ClientScript class.

Scott's code initializes a client-side array with a list of inputs to monitor and the initial value of each input.  He then uses the onbeforeunload event to check if the data in any of these inputs has changed and displays a confirmation prompt if any data hase changed.  This event fires even if the user attempts to exit the form by closing the browser or clicking the brower's 'Back' button.

I liked Scott's approach so much that I took his public methods and moved them into a base class that inherits from System.Web.UI.Page and I inherit all my web pages from this class.  Now in each Page_Load, I can call methods of the base class to register controls that, if changed, will mark page data as dirty and prompt the user when he attempts to navigate away without saving.

I noticed that the "initial state" of controls were reset whenever a postback occurred, so I created a method "MarkDataAsDirty" that could be called when a control's "autopostback" fired but when the user is not finished entering data.  This sets a hidden form on the client that is checked in the onbeforeunload method to determine if data has changed.

I also made the methods public so they could be accessible to any user controls dropped on a page.  And I created the utility method RegisterForConfirmUnsavedChanges that registers the most common controls on the page using Scott's original methods.

I've included a sample ASP.NET web site in which every page inherits from a base page and methods of that base class are called to implement this functionality.

 

ConfirmSaveSite1.zip (9.51 KB)
Thursday, February 21, 2008 4:15:33 PM (GMT Standard Time, UTC+00:00)

Tonight's lunar eclipse was impressive.  I think I saw a full lunar eclipse when I was a boy but I don't remember it well.  This time I saw the moon with the full shadow of the Earth upon its face.  As I had heard, the light around the Earth's atmosphere cast a blood-led glow on the moon, giving it an eerie quality.  I managed a couple of photos despite not having a handy tripod.

 

Photo by David Giard

 

Thursday, February 21, 2008 3:18:54 AM (GMT Standard Time, UTC+00:00)
# Wednesday, February 20, 2008

My son's high school basketball team won again tonight.  In the first half, they were thoroughly outplayed and trailed by as many as 24 points.  But they chipped away at the lead and ended up winning by 4.  It was a big win, not because they beat a good team (they did) but becuase it was the last game of the year and they finished the season 20-0.  It was the first undefeated team at his school in 35 years.

The state tournament starts Monday in Dexter. 

Nick and Dave

You can view photos of the final game (along with a kick-ass soundtrack) below.

Wednesday, February 20, 2008 3:27:42 AM (GMT Standard Time, UTC+00:00)
# Sunday, February 17, 2008

The DevCares event went pretty well.  Over 40 people attended.  I didn't have a decent laptop to use and I ended up borrowing one from a friend but it was not nearly powerful enough to run all the demos on the Virtual PC.  This detracted from the presentation.

I will be delivering this same presentation for my customer next Friday and I have already requested better hardware.     

I got some help from Mike Wood, who delivered this presentation the week before in Cincinnati.

You can view the materials at www.davidgiard.com/DevCares.

 

Sunday, February 17, 2008 4:47:16 PM (GMT Standard Time, UTC+00:00)