title: TreeView - OnSelectedNodeChanged not firing for Programmatically Added Nodes
body: <p>I've been searching, including <a href="https://stackoverflow.com/questions/3088730/asp-net-2-0-treeview-onselectednodechanged-does-not-fire-in-an-user-control">similar questions here</a> to no avail. If I click on a node that I've added to a <code>TreeView</code>, the <code>OnSelectedNodeChanged</code> event does not fire. Even ignoring that, just on a <code>Page_Load()</code>, the <code>SelectedNode</code> property is null.</p>
  
  <p>My TreeView control is:</p>
  
  <pre><code>&lt;asp:TreeView runat="server" ID="TheView" OnTreeNodePopulate="Populate" OnSelectedNodeChanged="SelectNode" /&gt;
  </code></pre>
  
  <p>In my code behind, I add one node:</p>
  
  <pre><code>TreeNode node = new TreeNode( "Root", "1" );
  node.PopulateOnDemand = true;
  node.SelectAction = TreeNodeSelectAction.Select;
  TheView.Nodes.Add( node );
  </code></pre>
  
  <p>Subordinate nodes are added identically:</p>
  
  <pre><code>foreach ( MyMenuItem item in list )
  {
      TreeNode newNode = new TreeNode( item.DisplayName, item.Value );
  
      newNode.PopulateOnDemand = true;
      newNode.SelectAction = TreeNodeSelectAction.Select;
      node.ChildNodes.Add( newNode );
  }
  </code></pre>
  
  <p>Everything shows up in the tree as I would expect, the page reloads when I click a node, but then nothing! What am I missing?</p>