Asp.net mvc 4 mvc4中的剑道按钮导航

Asp.net mvc 4 mvc4中的剑道按钮导航,asp.net-mvc-4,button,kendo-ui,Asp.net Mvc 4,Button,Kendo Ui,我在MVC4应用程序中使用剑道按钮。我应该如何以及在何处单击按钮将导航写入另一页 @(Html.Kendo().Button() .Name("btncancel") .HtmlAttributes( new {type = "button"} ) .Content("Cancel")) 我确实喜欢这个,但我不喜欢 <script type="text/javascript"> $(document).ready(function () { $('#btncancel').

我在MVC4应用程序中使用剑道按钮。我应该如何以及在何处单击按钮将导航写入另一页

@(Html.Kendo().Button()
.Name("btncancel")
.HtmlAttributes( new {type = "button"} )
.Content("Cancel"))
我确实喜欢这个,但我不喜欢

<script type="text/javascript">
$(document).ready(function () {
    $('#btncancel').click(function (e)
  {
      location.href = '@Url.Content("~//Company/Index.cshtml")';
  });

});

$(文档).ready(函数(){
$('#btncancel')。单击(函数(e)
{
location.href='@Url.Content(“~//Company/Index.cshtml”);
});
});
使用

使用

使用

使用


我很高兴它对你有用。你介意把我的答案标为正确答案吗?我很高兴它对你有用。你介意把我的答案标为正确答案吗?我很高兴它对你有用。你介意把我的答案标为正确答案吗?我很高兴它对你有用。你介意把我的答案标为正确答案吗?
window.location = '@Url.Action("Index", "Company")';