Technical content from the staff at 2e2. We are always busy with; SharePoint / moss, c#, records management (EDRM) and anything .net
I have read many blogs on this, they talk about checking things like HtmlPage.IsEnabled.
Personally I use Application.Current this will be NULL if you are in design mode.
public static bool InDesignMode(){ return App.Current == null;}