Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
Can someone please tell me how to create a binary treeview in ASP.net c#. I want to build a tree like in this link for my project. The link is http://demo.essentialobjects.com/Demos/TreeView/Demo.aspx[^]

On the left hand site there is a binary tree structure for which I have to write code for ASP.net in C#.

So please tell me how to create a binary tree for that.

Thanks in advance!

[Edit]
Added the link from the repost of this question!
[/Edit]
Posted
Updated 21-May-12 1:20am
v5
Comments
Manfred Rudolf Bihy 21-May-12 6:48am    
The link you provided does not work. Please fix it!
Manfred Rudolf Bihy 21-May-12 7:15am    
When I told you to fix your link, I didn't say anything about reposting you question. Don't do that again!
Manfred Rudolf Bihy 21-May-12 7:18am    
The tree that is depicted by the website you linked to is not a binary tree. You better learn to ask the right questions otherwise you won't receive any correct answers!

Since you didn't frame your question well you did not receive any useful information. First you failed by posting a non functional link and the you failed by thinking you could just post another question. From the link in your repost you could have easily seen that what you are looking for is a treeview. That word is in the URL.

Anyhow here is the MSDN information for the ASP.NET TreeView control[^].

Here is a tutorial: http://www.brainbell.com/tutorials/ASP/TreeView.html[^].

See here on CP: A simple Binary Search Tree written in C#[^].

or here: http://www.dijksterhuis.org/implementing-a-generic-binary-tree-in-c/[^]

and not to forget here: http://www.smokycogs.com/blog/an-implementation-of-a-binary-tree-in-c-sharp/[^].

Let's see what the Microsofties have: http://msdn.microsoft.com/en-us/library/ms379573(v=vs.80).aspx[^].


That should just about do it. Any doubts left?

Regards,

Manfred
 
Share this answer
 
v3
 
Share this answer
 
v3
Comments
Manfred Rudolf Bihy 21-May-12 7:26am    
OP was after a treeview and not a binary tree. I corrected my solution. Feel free to follow. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900