I am trying to call Controller method from a Button in view.
Controller:
public ActionResult DownloadTemplate()
{
return View("DownloadTemplate");
}
[HttpPost]
public ActionResult onclick()
{
Console.WriteLine("clicked");
return View();
}
View:
<td class="rightalign">
<span class="leftalign">
@(Html.Kendo().Button()
.Name("btnBlankTemplate")
.HtmlAttributes(new { type = "button", @class = "k-primary" })
.Content("Blank Template"))
</span>
How can i Simply call the onclick() method by clicking the view button?
If Kendo MVC is not supporting how can I use simple Button?