Kendo UI MVC 不呈现简单控件

Kendo UI MVC not renderingsimple controls

我正在使用 kendo MVC UI。我已经放置了一个按钮来测试。我已经设置了所有东西。正在构建解决方案,但按钮被呈现为一个简单的按钮,它没有我提到的 k- 类 和图像。

@(Html.Kendo().Button() .Name("btn") .HtmlAttributes(new { type = "button}) .ImageUrl(Url.Content("~/Content/Images/qbo.png")) .Content("This Button"))

上面的html渲染为:

<button class="element-center" id="btn" type="button">This Button</button>

有什么想法吗?

在您的代码中,您在类型属性后缺少一个 "

type = "button

无论如何,看看 examples

@(Html.Kendo().Button()
    .Name("imageButton")
    .HtmlAttributes( new {type = "button"} )
    .ImageUrl(Url.Content("~/Content/shared/icons/sports/snowboarding.png"))
    .Content("Image icon"))

我发现了问题。 MVC 包装器脚本放置在 kendo 个脚本文件之前。我已经推迟了脚本渲染,现在它工作正常。