Yesterday I stumbled upon a really nice work done by the Microsoft/.NET based patterns & practices community. I think it is really worth to take a look at it.

You can find it here: apparchguide.codeplex.com

Actually it had been around for some months now, but I didn't notice it yet.

Especially the checklists are useful for people that work in organization that have no defined approach to creating Application Architectures.


Beware of the UNDERSCORES!

Infragistics netAdvantage-Controls in WebParts or UserControls can give u some trouble, If u ever like to interfer with them on the ClientSide.

As you start to experiment with them.
A basic problem is, that they don't use the VisualStudio standard for clientID's of controls.

For example:
Standard
Calendar1.clientID hosted in Control1 is Control1_Calendar1
What infragistics expects
Control1Calendar1 ( = Control1.ID +Calendar1.ID )



I don't know why, but they use the ID's of the parent Controls and add them together, instead of simply getting the ClientID of the control.

Workaround:
When you have to pass the ClientID of a control to infragistics-ClientSide methods, simply erase all underscores in the ClientID you get from the Control:

ClientID.Replace("_", "")


Example to register ClientScript-Block that starts an infragistics webMenu when clicking on an infragistics webTree, for use in WebParts/UserControl :

// register Clientscript
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
this.ClientID + "PopupMenuFeatureConfig",

"<"+ "script id=\"igClientScript\" type=\"text/javascript\">\n" +
"function TreeNodeClick_" + this.ClientID + "(treeId, nodeId, button){\n" +
"if(button == 2){\n" +
"igmenu_showMenu('" + UwmPopupDialog.ClientID.Replace("_", "") + "', event);\n" +
"return true;}\n" +
"}" +
"<" + "/script"); // set according ClientSideEvents

UwtFeatures.ClientSideEvents.NodeClick = "TreeNodeClick_" +
this.ClientID;

remark:
as there can be several same UserControls/webParts on one page you need to use the ClientIDs!

So now you have only too make shure no Controls you use have UNDERSCOREs in their ID's.
Beware of the UNDERSCORES!
Important Note: This is some older post i wrote about 2 years ago. Actually I don't know if this workaround is still necessary, as my current employer doesnt use infragistics controls.

last man coding

still busy at work when everybody's at home