【发布时间】:2014-02-04 04:25:16
【问题描述】:
在我的 index.cshtml 页面中,以下代码行会触发 HttpPost,以便我可以进入控制器类中的 HttpPost 标记的 Index 方法。
<input type="submit" value="Run Calculation" />
[HttpPost]
public ActionResult Index(TimberBeamCalculator.Models.Dimensions dim)
{
..................
}
但是下面的 kendo ui 按钮代码,不会触发上面提到的 HttpPost。
@Html.Kendo().Button().Name("setting").Icon("pencil").HtmlAttributes(new { type = "button" }).Content("Run Calculation");
我错过了什么??
【问题讨论】:
-
发帖的呼声在哪里?您不必为帖子创建点击处理程序吗?
-
“提交”类型的输入将导致包含提交按钮的表单发布到服务器。
标签: c# asp.net-mvc-4 kendo-ui