【问题标题】:Kendo button navigation in mvc4mvc4中的剑道按钮导航
【发布时间】:2013-12-27 07:13:43
【问题描述】:

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

@(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")';
  });

});

【问题讨论】:

    标签: asp.net-mvc-4 button kendo-ui


    【解决方案1】:

    使用

    window.location = '@Url.Action("Index", "Company")';
    

    【讨论】:

    • 我很高兴它对你有用。您介意将我的答案标记为正确答案吗?
    猜你喜欢
    • 1970-01-01
    • 2016-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-24
    • 1970-01-01
    相关资源
    最近更新 更多