Posted on: 6/8/2014 6:01:13 AM | Views : 434

I have a menu control in my website where menu items(parent)  and sub menu items(child) are populate through database.
In below code ParentId=0 when its a menu item and ParentId > 0 when it's a sub menu item. The code is working fine.
if(!IsPostBack) { SqlConnection sqlConnection; string dbConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; sqlConnection = new SqlConnection(dbConnectionString); DataSet ds = new DataSet(); DataTable dt = new DataTable(); using (sqlConnection) { SqlCommand command = new SqlCommand("proc_GetCategories", sqlConnection); command.CommandType = CommandType.StoredProcedure; sqlConnection.Open(); SqlDataAdap ...

Go to the complete details ...