Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 ASP.NET HTML
this is my datset...... its having 3 column as per shown
id       Text         parent id
----------------------------
1  	Micro  	         0
2  	mahape  	 1
3       vashi  	         1
4  	Andheri	         1
5  	M-SDD   	 2
6  	M-EDD   	 2
7  	V-Admin	         3
8  	V-HR	         3
9  	A-SDD	         4
10  	A-Admin	         4
11  	Pune	         1
i require code in asp.net to convert it into unorderlist of html
 
i want result like that but i cant get it so please.....
<ul id="org" style="display:none">
<li> MICRO <ul>
 

 

             <li>MAHAPE
                <ul>
                    <li>M-SDD</li>
                    <li>M-EDD</li>
                </ul>
             </li>
 

             <li >VASHI
                 <ul>
                    <li>V-ADMIN </li>
                    <li>V-HR</li>
                 </ul>
             </li>
 
             <li >ANDHERI
                 <ul>
                  <li>A-SDD</li>
                  <li>A-ADMIN</li>
                 </ul>
             </li>
 

 
</ul>
</li>
</ul>
 

so please help me
 

 
i used this link but not giving prefect output
http://stackoverflow.com/questions/2456688/converting-hierarchical-data-into-an-html-unordered-list-programmatically-using[^]
 

[edit]Code block added - OriginalGriff[/edit]
Posted 15-Dec-12 21:21pm
Edited 16-Dec-12 0:46am
v6
Comments
Krunal Rohit at 16-Dec-12 2:29am
   
so what is your output ??
maddysagar at 16-Dec-12 3:51am
   
i want result like that but i cant get it so please help
maddysagar at 16-Dec-12 5:30am
   
at last i solved it!

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Answered to remove from unanswered list - solved by OP.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 490
1 Maciej Los 305
2 Richard MacCutchan 270
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,834
1 Sergey Alexandrovich Kryukov 7,477
2 DamithSL 5,689
3 Maciej Los 5,329
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411028.1 | Last Updated 16 Dec 2012
Copyright © CodeProject, 1999-2014
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