Thursday, December 28, 2006

Not that Smart

After struggling way too long to create properties of type System.Int32 for the SmartPart, I decided to reflector 'ReturnOfSmartPart.dll'.

For some reason the values of my Int32 properties aren't persisted (yes, they are public, get + set, with System.ComponentModel.[BrowsableAttribute(true)] and even a [DescriptionAttribute("...")].

Reflector saved the/my day (again) (see image)

Somewhere in the 'ApplyChanges'-method of class 'UserControlPropertiesToolpart' there's a 'typo' (programmers don't like to use the word 'bug'):

if (text2 == "System.Int")

This should be

if (text2 == "System.Int32")

As int is 'syntactic sugar' for the real .NET System.Int32 type.
So, I used a System.String instead and 'lived happily ever after' ...

Reflector screenshot

Friday, December 22, 2006

OutSmart the SmartPart

My 5 cents on how-to-use SmartPart in Microsoft Office SharePoint 2007

1. After installation of SmartPart and creation of the 'UserControls'-folder in your SharePoint-site, you can deploy
a. Self-contained .ascx-file's (read markup + code) in the UserControls-folder.
b. Codebehind-modeled usercontrols (read separate .ascx + .cs); drop both files in this folder.
c. Updatable+compiled-modeled usercontrols (read: .ascx with markup + compiled .dll); put the .ascx-file in the UserControls-folder and the .dll-file in the 'bin'-folder of your site.

2. Place a System.ComponentModel.DescriptionAttribute on you class with a 'user-friendly' description.

3. Custom properties for your UserControl(-derived) class have to be attributed with System.ComponentModel.[BrowsableAttribute(true)] (and an optional [DescriptionAttribute("...")]) if u want them to appear in the MOSS-WebPart-propertygrid.

//TODO: Connections

Friday, December 08, 2006

A Blogging Tip

Thou Shall Not Steal Bandwidth

Microsoft learned it the hard way

Niall Kennedy took some pics from last year's Gnomedex and hosted them on Flickr under Creative Commons. Microsoft's RSS blog linked directly to one of his pics without source and Niall replaced it with a modified Goatse image!

WARNING: Explicit content!  Screenshot; no Goatse for me ;-)

An apology followed: 'Apologies to readers who downloaded an earlier version of this post, which used a photograph taken by Niall Kennedy and posted on He did not appreciate the usage, and replaced it with a different image. I forgot to include an attribution, which I had fully intended to do, but for which I apologise to him'

Wednesday, November 22, 2006

Prison Break 2

Sunday, the first season of Prison Break ended on the Belgian television. I couldn't wait for season 2 to begin (somewhere next year?).
So, I just saw the first episode of season 2 (with Dutch subtitles)..!

Be patient my friend, very patient. I couldn't, but I have a very good South African friend, who owned me for a 'years-between-1900-and-2055'-regular expression... ;-)

Monday, November 13, 2006

Get @ Live

.com email-addres

UPDATE: its 'by design'; 'Live' is a word-play, not a typo.

UPDATE: 2 late, Microsoft patches Windows Live Signup Programme.

Tuesday, October 24, 2006

File-properties 4 App_Code.dll

Tip: put an 'AssemblyInfo.cs' in your (ASP.NET) 'App_code'-folder to get 'nice(r)' file-properties for 'App_Code.dll',
like so

Friday, October 20, 2006

Release vs Debug Build

In 'AssemblyInfo.cs' I do this

[assembly: AssemblyDescription("Debug-build")]
[assembly: AssemblyDescription("Release-build")]

to see the kind of build in the 'Comments' of my assembly-file-properties,
like this

Tuesday, September 12, 2006

X Marks the Spot

Last week, someone very dear to me had to undergo a chirurgical operation on the RIGHT food.  At the moment of truth, the nurses paper mention to perform an operation on the LEFT food!?

Needless to say, someone left the room with a big X on the 'other left' food.

Monday, August 21, 2006

I Just 'Saw'

part II
, can't wait to 'see' part III

Monday, August 14, 2006

Wednesday, August 09, 2006

(Milk) without Cookies

ASP.NET Forms-authentication doesn't 'work' when a (browser)client refuses cookies. Specifying 'cookieless="AutoDetect"' in 'web.config' will make log-in/out possible.

<authentication mode="Forms">
    <loginUrl="login.aspx" defaultUrl="default.aspx" cookieless="AutoDetect" />

1. Disable cookies in IE
Go to: menu 'Tools' - 'Internet Options...' - (3th) tab 'Privacy' - button 'Advanced...'.
ATTENTION: IE only allows to refuse cookies in the 'internet zone'!

2. Run the Visual Studio 2005 webserver in an 'internet zone-context'.
By default the VS2005 webserver runs in the 'intranet zone'. To 'switch zones' use a full IP-address instead of 'localhost'; so if your website runs at 'http://localhost:28894/myWebsite/' use ''. Notice the 'internet'-zone-icon in the statusbar.

After a successful (forms-)authentication, You will see something like this '' in IE's navigationbar. The red-colored-text is a 'URL-based-cookie'.

Thursday, August 03, 2006

U Know What 2 Do!

Digg This!

(Read as: just added 'Digg This!' for each post.)

Tuesday, August 01, 2006

Hierarchical iteration à la .NET 2.0

E.g. a foreach-iteration over the (sub)items of a (System.Web.UI.WebControls.)Menu or TreeView...

private delegate ICollection GetChildrenDelegate<T>(T parent);

private IEnumerable<T> getHierarchicalItems<T>(
   ICollection source
   ,GetChildrenDelegate<T> getChildren
   Queue<T> q = new Queue<T>();
   ICollection childs = source;

   while (true)
      foreach (T item in childs)
         yield return item;

         if (getChildren(item).Count > 0)

      if (0 == q.Count) { break; }
      childs = getChildren(q.Dequeue());

Iteration over Menu/-Items
GetChildrenDelegate<MenuItem> getSubMenus =
   delegate(MenuItem current)
         return current.ChildItems; 

foreach (MenuItem item in this.getHierarchicalItems<MenuItem>(
   , getSubMenus))

Iteration over Tree-View/-Nodes
GetChildrenDelegate<TreeNode> getSubNodes =
   delegate(TreeNode current)
         return current.ChildNodes;

foreach (TreeNode item in this.getHierarchicalItems<TreeNode>(
   , getSubNodes))

Thursday, July 13, 2006

13, unlucky ...

An addictive logic-game, trying 2 work out the url of the next number...

(read as: I am on number 13)

UPDATE I: I stranded on step 17 to 18 ...

UPDATE II: the answers for step 1 to 17 are in the comments-section.

Friday, July 07, 2006

A Fair(er) World

At the new GooglePlex they all have flatscreen monitors and ball-shairs...

But do they have [1] a FREE newspaper and [2] FREE coffee on their desk in the morning (read: after getting [1] and making [2] it myself...?


Tuesday, June 20, 2006


Not only software is a craftsmanship,
so is(/was) this-weekends-work

Just to prove he (read: my colleague) is not the only one with 'green (IT) fingers ;-)'.

UPDATE: I forgot to mention that a 'hedge of palm' aka 'Buxus Sempervirens' aka 'box' can't (read: mustn't) be cut with an electric hedge trimmer. It has to be done with good old-fashioned hand shears.

Monday, June 19, 2006

Every T-shirt Has ITs Story

Mine goes like this: an Atari Lynx was my first (handheld) game console.
Those 'good old days'.(?)

Friday, June 09, 2006

Step by Step

1 (Thank God) and 2 are behind me.
Heading to (optionally) 7 (sorry boss, you never know...),
but definitelly 'the EndGame',
skipping all the other sh*t,
being a 'happy' single (at the moment)...

Like they say: 'Life Is a B*tch, and Then You Die'.

PS: I Regret Nothing!

Friday, May 26, 2006

1 More

reason for this

Now, which one should I choose?
Another dressing-issue in the make..?

Wednesday, May 24, 2006

iDon't CARE

Do you enjoy surrogates like 'deca(ffeinnated) coffee' or 'diet chocolate' (be honest)..!?

Go for the real thing

Thursday, May 11, 2006

MS Visual Studio 2005 External Tools

To create a menu-item named 'Xplore Solution'
to open (File-)Explorer in the folder of your current solution

click menu 'Tools' - 'External Tools...'
and fill in the following parameters...

in Visual Studio 2003

Title: Xplore Sol&ution
Command: explorer.exe
Arguments: "$(SolutionDir)",/e

Pay attention to the 'Arguments'-section
as this does NOT work in Visual Studio 2005

Visual Studio 2005 appends a backslash to the resolved $(SolutionDir)..!(?)
Read as: on my system is does :-(

So 'myDrive:\Folder\SolutionFolder\' becomes 'myDrive:\Folder\SolutionFolder\\

(My) WORKAROUND: supply 'Arguments' as "$(SolutionDir)\.",/e

Again pay attention to the extra \. after $(SolutionDir)

This 'tricks' Visual Studio and/or '(File-)Explorer to use 'myDrive:\Folder\SolutionFolder\.\', which is a valid path :-)

Wednesday, March 29, 2006


(Read as: Missing In Action)

Not really,
although there's less(/little/no) action these days :-(

My 'excuse'(?): I have the 3th & 4th season of Alias (on DVD) to watch ;-)

So Little time..!

Luckily, I've found the 'perfect combination' of 2 of my (current) interests: Web 2.0 and Star Wars (MUST SEE) ...

Tuesday, January 17, 2006

Want some 'Extras'?

No episode of my favorite (and only) TV-show 'Extras' (from and with Ricky Gervais, also known from 'The Office') yesterday, since last weeks was first seasons last (unannounced) :-(

Fortunately a second series has been ordered
and someone forgot to disable 'directory browsing' on the website.  Enjoy guest starts as
Ben Stiller (MUST SEE), Kate Winslet, Samuel L Jackson and Patrick Stewart...

Wednesday, January 11, 2006