DotNetNuke function FindControlRecursive -not clear name.

DotNetNuke has function FindControlRecursive. Initially I assumed that it search down hierarchy, but it doesn't work as I expected.
After reading code it seems that it searched siblings or parens siblings up to the top of hierarchy.
So the name is misleading.

Fortunately  there is a separate function FindControlRecursiveDown, that does what I needed.

Dynamically add User Control to other ASP.NET controls children list.

I wanted to dynamically add my user control as a child to another control.
I've used the code with new constructor, as I did for standard ASP.NET server controls and custom controls.

 Dim ctrlInstances As SearchAreasInstancesUsc = new SearchAreasInstancesUsc() 'Incorrect
tCell.Controls.Add(ctrlInstances)

Then I found that declaratively defined( in ASCX markup) controls are not initialized and set to null.
Of course, I should LoadControl to allow ASP.NET to initialize all declarations.

Dim ctrlInstances As SearchAreasInstancesUsc = LoadControl("SearchAreaInstancesUsc.ascx"'correct
tCell.Controls.Add(ctrlInstances)

UPDATE: I strongly recommend to read a great atricle: TRULY Understanding Dynamic Controls  -Parts 1-4.
(See also related Rendering ASP.NET Controls out of order  and Rendering ASP.NET Controls out of place)

If you still need to use dynamic controls, some more examples are shown in Dynamically Created Controls: Dynamic Rows Sample (and Dynamically Created Controls in ASP.NET). 

Difference in HybridDictionary and Generic Dictionary Item behavior if the specified key is not found

In .Net 1.1 I've used HybridDictionary.Item and my code expected that if the specified key is not found, attempting to get it returns a null reference.
But in .Net 2.0  Generic Dictionary.Item  if the specified key is not found, a get operation throws a KeyNotFoundException  and I have to use Dictionary.TryGetValue  or check ContainsKey before calling Item.

 

«August»
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789