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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Convent cshtml to vbhtml (Razor CS => VB.net)

Thread ID:

Created:

Updated:

Platform:

Replies:

118039 Jan 23,2015 03:14 AM UTC Jan 23,2015 12:39 PM UTC ASP.NET MVC 1
loading
Tags: Menu
Saulo
Asked On January 23, 2015 03:14 AM UTC

I'm having trouble using the controls because the examples are all present in cshtml and I have to translate them step by step. I'm trying to create a menu with a defined list, but I got stuck in this:

@Html.EJ().Menu("menujson").MenuFields(f => f.Datasource(CType(ViewBag.datasource, IEnumerable(Check.Controllers.CheckController.icons)).Id("pid").Text("mtext").ParentId("parent").SpriteCssClass("sprite"))

Can someone help with?

Kaliswaran Shanmuga Sundaram [Syncfusion]
Replied On January 23, 2015 12:39 PM UTC

Hi Saulo,

Thanks for using Syncfusion products.

Query: I'm having trouble using the controls because the examples are all present in cshtml and I have to translate them step by step. I'm trying to create a menu with a defined list, but I got stuck. Can someone help with?

We can achieve your requirement by modifying the “MenuFields” property of Menu component. In this we need to give the “DataSource” as sub items of “MenuFields” property using “Sub()” method.

Please refer the following code snippet to use the menu control with “Datasource”.

[vbhtml]

 

@Html.EJ().Menu("menujson").MenuFields(Sub(menuf) menuf.Datasource(ViewBag.datasource).Id("pid").Text("mtext").ParentId("parent").SpriteCssClass("sprite"))

 

For your convenience we have prepared a simple sample based on your requirement. You can also download the attached sample from the following location.

Sample Link: Menu-sample

In the above sample, we have used our Menu control for demo. If you still face any problems, please revert back us with your sample and replication procedure. This would be helpful for us to provide you the exact solution.

Please let us know if you have any queries.

Regards,

Kaliswaran S


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

;