title: Web Control TreeView select a Node programmatically
body: <p>I use asp.net 4 and c#.
  I have a TreeView and I would like select an existing node programmtically.</p>
  
  <pre><code>SelectNode() method is read only
  </code></pre>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.selectednode.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.selectednode.aspx</a></p>
  
  <p>so I do not know how to do it.
  Please reply for a TreeView WEB CONTROL not for Win App.</p>
  
  <p>My Code:</p>
  
  <pre><code>protected void uxTreeView_DataBound(object sender, EventArgs e)
  {
      TreeView myTreeView = (TreeView)uxManageSlotsDisplayer.FindControl("uxTreeView");
      myTreeView.Nodes[2].Selected = true;
  }
  </code></pre>