title: treeview node click events c# asp .net
body: <p>I have a web application using TreeView control in C# asp .net.</p>
  
  <p>I have set up the event handlers for 2 events 
  1) onselectednodechanged
  2) ontreenodeexpanded</p>
  
  <pre><code>      &lt;asp:Panel ID="PanelTreeView" runat="server" height="510" Width="270" ScrollBars="Auto"&gt;
          &lt;asp:TreeView ID="TreeViewTabs" runat="server" Font-Size="Medium" NodeIndent="10" 
             onselectednodechanged="TreeViewTabs_SelectedNodeChanged" 
               ontreenodeexpanded="TreeViewTabs_TreeNodeExpanded"&gt;
             &lt;LeafNodeStyle Font-Overline="False" Font-Size="Small" NodeSpacing="0px" 
                  VerticalPadding="0px" /&gt;
              &lt;NodeStyle NodeSpacing="0px" VerticalPadding="0px" /&gt;
             &lt;SelectedNodeStyle ForeColor="Red" /&gt;
          &lt;/asp:TreeView&gt;                      
       &lt;/asp:Panel&gt;
  </code></pre>
  
  <p>The problem is that if the user clicks on a selected node in the tree, the web app posts back and I don't know which event I should catch. I know it is definitely not "onselectednodechanged" event. I also tried event handler "onTreeNodeCheckChanged", it does not fire that event either. I know that the post back will go through Page_Load() handler, but I would prefer to catch this event the way I catch "onselectednodechanged" for the TreeView. </p>
  
  <p>Thanks in advance.</p>