We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add multiple sub menus

Thread ID:

Created:

Updated:

Platform:

Replies:

132138 Aug 16,2017 09:43 AM UTC Aug 18,2017 09:23 AM UTC ASP.NET Core 3
loading
Tags: Menu
Edmund Herbert
Asked On August 16, 2017 09:43 AM UTC

Hi is it possible to have multiple sub menus in one main menu

Menu--|
            | Sub Menu
Menu 1|
            | Sub Menu 2

Could you show me how to do in Asp.Net MVC View

Thanks

Edmund Herbert

Keerthana Rajendran [Syncfusion]
Replied On August 17, 2017 07:27 AM UTC

Hi Edmund,     
   
Thank you for contacting Syncfusion Support.   
   
Yes, it is possible to have multiple submenu in one main menu. Please refer to the given code   
   
@Html.EJ().Menu("syncfusionProducts").EnableCenterAlign(true).EnableRTL(false).Items(items =>   
               {   
                   items.Add().Url("#").Id("Products").Text("Products").Children(child =>   
                       {   
                           child.Add().Url("").Text("ASP.NET");   
                           child.Add().Url("").Text("Orubase Studio");   
                           child.Add().Url("").Text("Metro Studio");   
                           child.Add().Url("").Text("What's New").Children(child1 =>   
                               {   
                                   child1.Add().Url("").Text("Windows Forms");   
                                   child1.Add().Url("").Text("Windows Phone");   
                                   child1.Add().Url("").Text("ASP.NET").Children(child2 =>   
                                       {   
                                           child2.Add().Url("").Text("ASP.NET MVC");   
                                           child2.Add().Url("").Text("ASP.NET Core");   
                                       });   
                               });   
                       });   
                   items.Add().Url("").Text("Support").Children(child =>   
                       {   
                           child.Add().Url("").Text("Direct-Trac Support");   
                           child.Add().Url("").Text("Services").Children(child1 =>   
                               {   
                                   child1.Add().Url("").Text("Consulting");   
                                   child1.Add().Url("").Text("Training").Children(child2 =>   
                                   {   
                                       child2.Add().Url("").Text("Software");   
                                       child2.Add().Url("").Text("Hardware");   
                                   });    
                               });   
                       });   
                   
                   });   
               })   
   
The menu will be rendered as shown below   
   
   
We have attached a sample for your reference. Please download the sample:    
   
   
Also, check the below links for more details about menu control   
   
   
   
Regards,   
Keerthana.   
 


Edmund Herbert
Replied On August 17, 2017 08:28 AM UTC

Hi thanks for reply I was looking for a solution for Asp.net Core 2.00 not MVC 5

Thanks

Edmund Herbert


Keerthana Rajendran [Syncfusion]
Replied On August 18, 2017 09:23 AM UTC

Hi Edmund,     
Sorry for the inconvenience caused.   
 
We have provided a sample in MVC based on your previous update. Now we have prepared a sample in ASP.NET Core 2.0 for menu. Please download the sample from    
  dotNetCore2   
We have also attached a document to know more details about rendering EJ controls in ASP.Net Core 2.0 . Please download the document from    
   
Regards,   
Keerthana  
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;