asp.net tree view
ASP.NET
2
Posts
2
Posters
0
Views
1
Watching
-
how to bind data from date base to tree view or must export date to xml,sitemab can i do it manualy (hope) thanks.
ahmed eldeghedy
-
how to bind data from date base to tree view or must export date to xml,sitemab can i do it manualy (hope) thanks.
ahmed eldeghedy
If you retrieve the data from the database using a DataReader you can populate a TreeView like this:
while (dataReader.Read())
{
TreeNode _newNode = new TreeNode();
_newNode.Text = "...";
_newNode.ImageUrl = "...";
_newNode.SelectAction = TreeNodeSelectAction.Expand;
_newNode.Target = "...";
_newNode.NavigateUrl = "...";
_newNode.Expanded = false;myTreeMenu.Nodes.Add(\_newNode);
}