I have the following HTML:
using (Html.BeginForm("EmailSend", "Home", FormMethod.Post))
{
code to enter email and press submit
}
and a void controller:
[HttpPost]
[ValidateAntiForgeryToken]
public void EmailSend()
{
code to send email
}
Obviously since I'm dealing with a void controller it has no view to show.
I just want to trigger this controller from my submit button in my view, without asking for a redirect. I thought, that since this isn't an ActionResult
it should understand?
How do trigger my controller without redirecting? Would i have to use jQuery or Ajax?