Note that there are some explanatory texts on larger screens.

plurals
  1. POLogic for displaying infinite category tree in nested <ul>s from Self Join Table
    text
    copied!<p>Please help me solve my big problem.<br/> in my on-line shopping project i created a <strong>dynamic Category List (with Infinite Level Depth)</strong> Implemented in a Single Table in DB with Self join. the schema is like below:<br/><a href="http://aspalliance.com/ArticleFiles/822/image002.gif">alt text http://aspalliance.com/ArticleFiles/822/image002.gif</a></p> <p><strong>Update</strong><br> I want to use a JQuery plugin to make a Multi Level Menu bar. this plugin uses <code>&lt;ul&gt;</code> and <code>&lt;li&gt;</code> elements so I should transform the DB table to <code>&lt;ul&gt;</code> and <code>&lt;li&gt;</code>. the result should like this:<br/></p> <pre><code>&lt;ul&gt; &lt;li&gt;Clothing 1 &lt;ul&gt; &lt;li&gt;Trousers 2 &lt;ul&gt; &lt;li&gt;Mens trousers 3&lt;/li&gt; &lt;li&gt;Ladies trousers 3&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;Jackets 2&lt;/li&gt; &lt;li&gt;Shirts 2&lt;/li&gt; &lt;li&gt;Shoes &lt;ul&gt; &lt;li&gt;Mens shoes 3 &lt;ul&gt; &lt;li&gt;Mens formal shoes 4&lt;/li&gt; &lt;li&gt;Mens casual shoes 4&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;Kids shoes 3&lt;/li&gt; &lt;li&gt;Ladies shoes 3&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;Cars 1 &lt;ul&gt; &lt;li&gt;Small cars 2&lt;/i&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>I can use a nested data control(like repeater control) but you know, with this solution i just can implement a list with non-infinite hierarchical tree structure.<br/> <strong>please help me! any suggestion?? I googled the web but not a suitable way found. I use <em>ASP.net 3.5 and LINQ</em>.</strong> <br/>what is the best way?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload