Click here to Skip to main content
11,500,844 members (79,667 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 21-May-12 0:14am
Edited 21-May-12 1:20am
v5
Comments
Manfred R. Bihy at 21-May-12 6:48am
   
The link you provided does not work. Please fix it!
Manfred R. Bihy at 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 R. Bihy at 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!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
v3
Comments
Manfred R. Bihy at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 395
1 Maciej Los 215
2 Peter Leow 215
3 DamithSL 165
4 Ralf Meier 134
0 Sergey Alexandrovich Kryukov 435
1 Maciej Los 345
2 DamithSL 285
3 Peter Leow 260
4 OriginalGriff 177


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 21 May 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100