title: Treeview in web form check child nodes on parent node check
body: <p>Im using Treeview control of System.Web.UI class, to display Category and subcategory of an item.</p>
  
  <p>I have tried the following code but no hope</p>
  
  <pre><code>        protected void tvwOrganisation_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
          {
              if (tvwOrganisation.CheckedNodes.Count &gt; 0)
              {
                  // the selected nodes.
                  foreach (TreeNode node in tvwOrganisation.CheckedNodes)
                  {
  
                      if (node.ChildNodes.Count &gt; 0)
                      {
                          foreach (TreeNode childNode in node.ChildNodes)
                          {
                              childNode.Checked = true;
                          }
                      }
  
                  }
  
              }
  }
  </code></pre>
  
  <p>Is there a way I can do this, I have tried javascript too.</p>
  
  <p>Also what is the replace of AfterCheck - windows formd event in web forms.</p>