This is a migrated thread and some comments may be shown as answers.

[Solved] Telerik Menu crashes on new views

0 Answers 6 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Fabio Talevi
Top achievements
Rank 1
Fabio Talevi asked on 19 Sep 2012, 09:01 PM
Hi Guys,

I'm having a big problem here.

Working with Telerik Menu, i have some views that throw the follow error:

"The call is ambiguous between the following methods or properties: 'Telerik.Web.Mvc.UI.MenuBuilder.BindTo(string)' and 'Telerik.Web.Mvc.UI.MenuBuilder.BindTo(System.Collections.Generic.IEnumerable<Telerik.Web.Mvc.UI.MenuItem>)'"

My view:
@using Telerik.Web.Mvc.UI
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}


My "~/Views/Shared/_Layout.cshtml" 
<!DOCTYPE html>
<html>
    <head>
        <title>@ViewBag.Title</title>
        @(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css").Add("telerik.webblue.css").Add("~/Content/Site.css").Add("~/Content/styles/styles.css").Combined(true).Compress(true)))
        <script src="/Scripts/jquery-1.4.4.js" type="text/javascript"></script>
        <script src="/Scripts/jquery-ui.js" type="text/javascript"></script>
        <script src="/Scripts/jquery.alerts.js" type="text/javascript"></script>
        <script src="/Scripts/jquery.ui.draggable.js" type="text/javascript"></script>
 
        <script src="/Scripts/racco.js" type="text/javascript"></script>
 
        <script src="/Scripts/2012.1.214/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="/Scripts/2012.1.214/telerik.common.min.js" type="text/javascript"></script>
 
        <link href="/Content/styles/Tema/jquery-ui-1.8.21.custom.css" rel="stylesheet" type="text/css" />
        <link href="/Content/styles/Site.css" rel="stylesheet" type="text/css" />
        <link href="/Content/styles/LayoutRacco.css" rel="stylesheet" type="text/css" />
        <link href="/Content/styles/Menu.css" rel="stylesheet" type="text/css" />
     
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=100" />
    </head>
    <body id="homepage">
        <div id="dialogAjaxLoading" style="display: none;">carregando...</div>
        <div class="page">
             <div id="header">
                <div id="title">
                    <a href="/Home/Index/">
                        <img src="/Content/styles/Imagens/Layout/imgLogo.png" title="Racco" alt="Racco" />
                    </a>
                </div>
            </div>
            <div id="menu"></div>
            <div class="newContent">
                <div class="maincontent">
                    @RenderBody()
                </div>
            </div>
        </div>
    </body>
</html>
<script type="text/javascript">
    $(document).ready(function () {
        try {
            $("#menu").load("/Common/Menu");
        } catch (e) {
            alert(e);
        }
    });


My /Common/Menu 
@(Html.Telerik().Menu().Name("TelerikMenu").BindTo(ViewBag.ListaMenu))


In chrome it shows:
  1. XHR finished loading: "http://localhost:18122/Common/Menu".


In most of my view it works fine, but only on new views it throws errors 

A tried to copy the code from some old view (that works fine) and paste to my new view and it crashes again.

Can anyone help me?
Tags
Menu
Asked by
Fabio Talevi
Top achievements
Rank 1
Share this question
or