拜求......asp.net 的高人...
public void treeV()
{
SqlConnection conn=new SqlConnection("server=.;uid=sa;pwd=sa;database=pubs");
SqlCommand comm=conn.CreateCommand();
comm.CommandText="select * from jindu_syst_func";
DataSet ds=new DataSet();
SqlDataAdapter sda=new SqlDataAdapter(comm);
sda.Fill(ds,"jindu_syst_func");
DataView dv=new DataView();
dv.Table=ds.Tables["jindu_syst_func"];
Microsoft.Web.UI.WebControls.TreeNode tn;
foreach(DataRowView drv in dv)
{
tn=new TreeNode();
tn.ID=drv["func_id"].ToString();
tn.Text=drv["func_name"].ToString();
this.TreeView1.Nodes.Add(tn);
}
}
这是我绑定的根节点..... 如何用递归? 帮我简单改下吧 谢谢哈...... 恩 ,我有个parentID