Click here to Skip to main content
12,813,879 members (31,979 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET CSS jQuery menu database , +
I am sorry for my poor english!
i have this imageDB
database and i want generate this format

by c# and from this table please help me it's urgent.
Posted 14-Jul-12 11:22am
Updated 14-Jul-12 11:27am
Abdul Quader Mamun 14-Jul-12 22:05pm
you need to little bit work with the code.

1 solution

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

Solution 1

System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection("connectionStringHere");

System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;

//you need to customize sp as you want
cmd.CommandText = "sp_Here";

System.Data.SqlClient.SqlDataReader reader;
reader = cmd.ExecuteReader();

System.Text.StringBuilder sb=new System.Text.StringBuilder() 

//you need to customize this as you want
sb.AppenedFormat("<li>{0}</li>"  reader.GetString(0));

Try with this code.

Behnam Mohammadi 15-Jul-12 14:54pm
Thank you very much.
But I want the menu to be made. The following sub-menu to the menu each time to be unlimited.
Such as content management systems.
If someone put the video in my top tips to help me get much thanks.
Very essential and urgent need
Thank you very much.
Abdul Quader Mamun 15-Jul-12 15:18pm

here is an example of parent-child or upto infinity. try with this
Behnam Mohammadi 24-Jul-12 11:46am

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 15 Jul 2012
Copyright © CodeProject, 1999-2017
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