简体   繁体   English

简单的剑道UI按钮

[英]Simple Kendo UI button

For an asp.net mvc4 website, Is there a way to use Kendo UI for a simple button? 对于asp.net mvc4网站,是否可以将Kendo UI用于简单按钮? This is not a mobile app. 这不是移动应用。 But Kendo UI does not appear to have regular button object like Html.Kendo().Button... It's not there. 但是Kendo UI似乎没有像Html.Kendo().Button...这样的常规按钮对象。

This is what I have now 这就是我现在所拥有的

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

I want to use Kendo UI button instead. 我想改用Kendo UI按钮。

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

But its not rendering at all. 但是它根本没有渲染。

If you can not access Html.Kendo().Button() it means your kendo ui mvc version is not 2013 Q3 or later. 如果您无法访问Html.Kendo().Button()则表明您的Html.Kendo().Button() ui mvc版本不是2013 Q3或更高版本。

the new code should be like this: 新代码应如下所示:

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM