I have a form. She has a submit
button. I use razor
@using (Html.BeginForm("Save", "Discount", FormMethod.Post, new { @id = "formForCreateDiscount"})) { }
the onclick()
event that runs before the onsubmit()
event onsubmit()
.
In onclick()
I need to delete some data only if the form is valid ... validation follows the model using @Html.ValidationMessageFor(m => m.TypeDiscount, "", new { @class = "text-danger" })
.
Can I check it somehow ????