Skip to content
Loading
}
 
+1
  • Salman Beg
    +1
    As you didn't mention any specific technologies so i am sharing few links which will help you but change your code as per the requirement, https://www.c-sharpcorner.com/UploadFile/4e2862/dynamically-creating-menus-and-submenus-items-to-web-forms/ https://www.c-sharpcorner.com/article/bind-menu-and-sub-menu-dynamically-in-mvc-from-database-using-linq/
    +1
  • +1
    I am using asp.net web forms not MVC and that too roles are not constant.
    Admin will create a roles at runtime with limited menus.Based on the roles , need to create a menus along with submenus created in asp.net dynamically. How can i implement in c#. 
    Give me some ideas.
    +1
  • Salman Beg
    +1
    See this example in asp.net, https://www.c-sharpcorner.com/UploadFile/77a82c/create-dynamic-menu-in-Asp-Net-without-database/ https://www.aspsnippets.com/Articles/Database-driven-ASPNet-Menu-control-Populating-Menu-items-from-the-Database-in-ASPNet-using-C-and-VBNet.aspx
    +1
  • Jignesh Kumar
    +1
    Hi,
     
    Please use this link which will help,
    https://www.c-sharpcorner.com/article/dynamic-menu-bind-depends-on-user-role-in-asp-mvc/ 
    +1
  • +1
    Thanks for the ideas. Without using the Asp.net menu control ,Is it possible to create a menu based on user roles  with the help of bootstrap/css? 
    +1
  • Salman Beg
    +1
    Without asp.net menu controls you can do that. Use ul, li and there apply bootstrap/css. Thanks
    +1
  • Jignesh Kumar
    +1
    Hi,
     
    Please refer this one for web form,
    https://www.c-sharpcorner.com/UploadFile/da55bf/jqueryui-dynamic-menu/ 
    +1
  • +1
    I can create a menu with bootstrap/css and am struck here is dynamically created through backend along with user role based.
    Creating a list with menuid,parentmenuname , and submenuname and need to pass to a function that will create a menu dynamically in backend along with the styles.
     
    Could you put little amount of code for front end and what i need to do it in back end.
    +1