【问题标题】:kendo config in asp.net coreasp.net核心中的剑道配置
【发布时间】:2020-07-27 17:46:58
【问题描述】:

我不知道如何在 asp.net core 项目中使用剑道

我在我的项目中添加了 js 和 css 文件 并在我的电脑上安装了 Telerik 并引用了 dll 文件

我在尝试使用上传文件组件时出现了这个错误:

“IHtmlHelper”不包含“Kendo”的定义,并且找不到接受“IHtmlHelper”类型的第一个参数的可访问扩展方法“Kendo”(您是否缺少 using 指令或程序集引用?)

我的项目是asp.net core 3.1,没有任何web.config文件

 <div class="demo-section k-content">
       @(Html.Kendo().Upload().Name("files").HtmlAttributes(new { aria_label = "files" }))
       <p style="padding-top: 1em; text-align: right">
         <button type="submit" class="k-button k-primary">Submit</button>
       </p>
 </div>

谢谢

【问题讨论】:

    标签: asp.net-core kendo-ui asp.net-core-mvc kendo-asp.net-mvc


    【解决方案1】:

    在 MVC 项目的 Views 文件夹中打开 _ViewImports.cshtml 文件,并向其中添加以下行:

    @addTagHelper *, Kendo.Mvc
    @using Kendo.Mvc.UI
    

    如果这不能解决问题,请查看https://docs.telerik.com/aspnet-core/getting-started/first-steps

    【讨论】:

      猜你喜欢
      • 2022-01-26
      • 1970-01-01
      • 2016-05-20
      • 2020-09-08
      • 2015-07-05
      • 1970-01-01
      • 2018-01-03
      • 2020-09-23
      • 1970-01-01
      相关资源
      最近更新 更多