how do i perform action on a form after validation javascript code example
Example 1: To call any action method from the view on button click
@using (Html.BeginForm("Edit", "Home", new { Id = emp.Id }, FormMethod.Get))
{
<button>EDIT</button>
}
@using (Html.BeginForm("Delete", "Home", new { Id = emp.Id }, FormMethod.Post))
{
<button>DELETE</button>
}
Example 2: javascript do not submit form
alert("hello world");
alert("it is a test");