package tree; public class Printnodesatkdistancefromroot { /** * Given a root of a tree, and an integer k. Print all * the nodes which are at k distance from root.For example, in the below tree, 4, 5 & 8 are at distance 2 from root. 1 / \ 2 3 / \ / 4
效果: 使用母板页进行,左右页面进行跳转. 绑定TreeView控件:http://www.cnblogs.com/KTblog/p/4792302.html 主要功能: 点击节点的时候,只操作最后一级的节点,其他节点跳过不执行代码. 代码: using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Web.UI.WebControls;