I have an index.cshtml page, in it there is a button:
<div>
@Html.EslButton(T("Create Request").ToString(), "createRequestBtn")
</div>
I then have a javascript onclick function in the same page
$("#createRequestBtn").on('click', function (event) {
event.preventDefault(event);
});
In my HomeController.cs I have a function called CreateRequests:
public ActionResult CreateRequests(ViewModel model)
{
return new EmptyResult();
}
Question
How do I, through clicking the button, go in to the method CreateRequests in Controller?
Thanks!