SELECT [Path].Menu_Id,dbo.[Path].Path_Detail, [Path].Path_Url, [Path].Sub_Menu_Id, pagesAssigend.roleId FROM pagesAssigend INNER JOIN [Path] ON pagesAssigend.pageNo = Path.Menu_Id WHERE (dbo.pagesAssigend.roleId = 1)
int RoleNo = Convert.ToInt16(Session["RoleId"]); objLogin.Role_Id = RoleNo; DataTable dt = new DataTable(); dt = objLogin.MenuMaking(); GridView1.DataSource = dt; GridView1.DataBind(); foreach (DataRow dr in dt.Rows) { MenuItem objMenuItem = new MenuItem(); objMenuItem.Text = dr["Path_Detail"].ToString(); objMenuItem.NavigateUrl = dr["Path_Url"].ToString(); MenuBar.Items.Add(objMenuItem); }
// Retrieve the root menu item from the Items // collection of the Menu control using the indexer. MenuItem homeMenuItem = NavigationMenu.Items[0]; // Create the submenu item. MenuItem newSubMenuItem = new MenuItem("New Category"); // Add the submenu item to the ChildItems // collection of the root menu item. homeMenuItem.ChildItems.Add(newSubMenuItem);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)