2
That’s more of a Javascript question than an ASP.NET MVC question, but come on.
The idea is to have it in your <form>
:
<form onsubmit="return confirm('Tem certeza?');">
That is to say:
@using (Ajax.BeginForm("Action", "Controller", new AjaxOptions { HttpMethod = "POST", OnSuccess = "OnSuccess" }, new { @class = "form-horizontal", role = "form", onsubmit="return confirm('Tem certeza?');" }))
{
}