简单的Kendo UI按钮

时间:2014-02-02 20:16:47

标签: c# asp.net-mvc-4 kendo-ui kendo-asp.net-mvc

对于asp.net mvc4网站,有没有办法使用 Kendo UI 作为一个简单的按钮?这不是一个移动应用程序。但是Kendo UI似乎没有像Html.Kendo().Button...这样的常规按钮对象。它不存在。

这就是我现在所拥有的

<input type="submit" value="Run Calculation" />

我想改用Kendo UI按钮。

@(Html.Kendo().MobileButton()
    .Name("textButton")
    .HtmlAttributes( new {type = "button"} )        
)

但它根本没有呈现。

1 个答案:

答案 0 :(得分:3)

如果您无法访问Html.Kendo().Button(),则表示您的kendo ui mvc版本不是2013 Q3或更高版本。

新代码应该是这样的:

@(Html.Kendo().Button()
.Name("textButton")
.HtmlAttributes( new {type = "button"} )
.Content("Text button"))

演示:Button / Basic usage -> ASP.NET MVC -> index.cshtml