This question is locked. New answers and comments are not allowed.
My Project is in VB.
I have a table Menus in the database with the following columns:
TennantId varchar(4)
MenuId int
MenuName varchar(30)
ParentId int
Controller varchar(50)
Action varchar(50)
From this table I select rows where TennantId = 'xxx' and get a number of rows (IE a List(of Menus))
I want to databind the menu control against this collection.
If ParentId = 0 this menuitem should be a top level menuitem.
If ParentId > 0 this menuitem should be a subitem to to the menuitem that has that value in MenuId.
The menu should be placed on the master page and can have a depth between 1 and 3 levels.
Can anyone give examples on how to accomplish this. What needs to be in the controller action and what needs to be in the view?
I have a table Menus in the database with the following columns:
TennantId varchar(4)
MenuId int
MenuName varchar(30)
ParentId int
Controller varchar(50)
Action varchar(50)
From this table I select rows where TennantId = 'xxx' and get a number of rows (IE a List(of Menus))
I want to databind the menu control against this collection.
If ParentId = 0 this menuitem should be a top level menuitem.
If ParentId > 0 this menuitem should be a subitem to to the menuitem that has that value in MenuId.
The menu should be placed on the master page and can have a depth between 1 and 3 levels.
Can anyone give examples on how to accomplish this. What needs to be in the controller action and what needs to be in the view?