【发布时间】:2015-06-23 03:57:18
【问题描述】:
我正在尝试从视图中的按钮调用控制器方法。
控制器:
public ActionResult DownloadTemplate()
{
return View("DownloadTemplate");
}
[HttpPost]
public ActionResult onclick()
{
Console.WriteLine("clicked");
return View();
}
查看:
<td class="rightalign">
<span class="leftalign">
@(Html.Kendo().Button()
.Name("btnBlankTemplate")
.HtmlAttributes(new { type = "button", @class = "k-primary" })
.Content("Blank Template"))
</span>
如何通过单击查看按钮调用onclick() 方法?
如果 Kendo MVC 不支持,我该如何使用简单的 Button?
【问题讨论】:
标签: c# asp.net asp.net-mvc