======code===========
private void InitTree(TreeNodeCollection Nds, Int32 parentId)
{
DataView dv = new DataView();
TreeNode tmpNd;
Int32 intId;
dv.Table = ds.Tables["board"];
dv.RowFilter = "rootid= " + parentId;
foreach (DataRowView drv in dv)
{
tmpNd = new TreeNode();
tmpNd.Value = drv["boardid"].ToString();
tmpNd.Text = drv["boardname"].ToString();
//tmpNd.NavigateUrl = drv["menuurl "].ToString();
Nds.Add(tmpNd);
intId =(Int32)drv["boardid"];
InitTree(tmpNd.Nodes, tmpNd.Value);//出错行
}
}
-----请问是什么原因呢?