Hello and many thanks to all for your attention. I need to draw an HTML menù (<ul><li>...) over data retrieved from a table with a schema like this: id(int autoincrement), parent_id(int), childs_count(int), description(varchar). Where id fields is a identifier for a category and parent_id identify parent category for child. I would like to know if is possibile to do it with a LINQ query or with a method that allow to retrieve all childs stored in a category of my menù. Thanks

Well once you get your data you can also improvise like this

foreach (DataRow row in name.Table.Rows)
{
Response.Write("<tr>");
                Response.Write(String.Format("<td>{0}<br/><br/></td>", row[1].ToString().Replace(Environment.NewLine, "<br/>")));
                Response.Write("</tr>");

Try to rearrange the code using your desired html tags..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.