Menu Control Throwing a Html Is Ambiguos Error

1 posts, 0 answers
  1. Vivek
    Vivek avatar
    16 posts
    Member since:
    Apr 2011

    Posted 06 May 2013 Link to this post

    Hi Guys,

    I am trying to create a dynamic generated menu using MVC, VB.NET and Razor and i am getting the following error:

    Compilation ErrorDescription: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

    Compiler Error Message: BC30561: 'Html' is ambiguous, imported from the namespaces or types 'System.Web.WebPages, System.Web.Mvc, Kendo.Mvc.UI'.

    Source Error:

    Line 2: @ModelType IEnumerable(Of MenuCategory)
    Line 3:
    Line 4: @(Html.Kendo().Menu() _
    Line 5: .Name("TestMenu") _
    Line 6: .BindTo(Model, Sub(mappings)
    Source File: C:\Documents and Settings\vivekba\my documents\visual studio 2010\Projects\test\test\Views\Home\TestMenu.vbhtml    Line: 4 

    This is my code in the view

    @Imports test.Models
    @ModelType IEnumerable(Of MenuCategory)

    @(Html.Kendo().Menu() _
                .Name("TestMenu") _
                .BindTo(Model, Sub(mappings)
                                       mappings.For(Of MenuCategory)(Sub(x)
                                                                             x.ItemDataBound(Sub(item, menu)
                                                                                                     item.Text = menu.Name
                                                                                             End Sub)
                                                                     End Sub)
                               End Sub)

    Any help will be really appreciated please.

Back to Top