剑道UI参考不在的Razor视图工作 [英] Kendo UI reference not working in Razor view

查看:472
本文介绍了剑道UI参考不在的Razor视图工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个Telerik的网格视图,但是当我去剑道引用它不承认它。 Visual Studio是给我一个错误,当我尝试引用剑道。这是代码 @(Html.Kendo()。网)以下是错误。

I am trying to create a Telerik Grid view but when I go to reference kendo it does not recognize it. Visual Studio is giving me an error when I try to reference kendo. This is the code @(Html.Kendo().Grid) and below is the error.

'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?)

我有在脚本和内容BundleConfig文件添加了一个包。此外,我已经添加了 @ Scripts.Render(〜/包/剑道) @ Styles.Render(/内容/剑道)直接把剃刀视图。

I have added a bundle in the BundleConfig file for both Scripts and Content. Also I have added @Scripts.Render("~/bundles/kendo") and @Styles.Render("/Content/kendo") directly to the razor view.

这是我读过许多文章表明,加入<添加命名空间=Kendo.Mvc.UI/> 到Web.config文件的工作,但它仍然是抛出了同样的错误。

Many articles that i've read suggest that adding <add namespace="Kendo.Mvc.UI"/> to the Web.Config file would work but it still is throwing out the same error.

有没有办法,我失去了一些东西?

Is there something that I am missing?

推荐答案

的问题是,你还没有包括到引用 Kendo.Mvc.dll 。有一个关于如何做到这一点定位的这里

The problem is that you have not included a reference to the Kendo.Mvc.dll. There's an explanation on how to do this in the documentation located here

在默认情况下安装在 C:\Program文件( 86)\Telerik

这篇关于剑道UI参考不在的Razor视图工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆