I have two buttons and only one work…
@using (Html.BeginForm("Edit", "Employer"))
{
<button name="Edit_hours">Edit</button>
}
</td>
<td>
@using (Html.BeginForm("Cancel", "Employer"))
{
<button name="Back">Back</button>
}
Back button work properly, but the Edit button dasn’t want work…
Controller and View should be good.
controller:
public ActionResult Edit()
{
return View();
}
View:
@{
ViewBag.Title = "Edit";
}
<h2>Edit</h2>
I don’t understand why it doesn’t work ;/
If you are trying to submit your form, then you need a
submit. You should have something likebuttondoesn’t really have any implicit behaviour, so I don’t know what you mean by ‘it doesn’t work’.