2016-03-20 23 views

回答

0
@(Html.Kendo().Button() 
    .Name("textButton") 
    .HtmlAttributes(new { @class = "btn-primary" }) 
    .Content("Add BusinessUnit") 
) 

而且在JavaScript

$('#textButton').on('click', function() 
    { 
    $.ajax({ 
     url: '@Url.Action("ActionName", "ControllerName")', 
     type: 'GET', 
     success: function (data) { 
      alert(data); 
     }, 
     error: function() { 
      console.log("add business unit error rendering page"); 
     } 
     }); 
    }); 

Telerik的按钮,HTML按钮之间的唯一区别就是造型。你可以使用普通的html按钮和按钮点击事件,因为它现在正在工作,只需将css类添加到按钮即可。 k-button和k-primary是kendo造型类

<input type="submit" value="Create" name="Command" class="k-button k-primary" /> 
相关问题