效果图:
DropDownList中显示无限级树形结构

数据库表:
DropDownList中显示无限级树形结构

DirID:目录的ID,ParentID:目录的父路径ID,Name:目录的名字
主要代码:

return datset.Tables[0];
}
}

当然,当读取DropDownList时若要去除"|--"和空格可以调用addOtherDll.SelectValue().Replace("|--","").Trim()

相关文章: