I have an Edit View with a Form which has two submit buttons:
<input type="submit" name="save" value="@Resources.Save" class="btn btn-default" />
<input type="submit" name="delete" value="@Resources.Delete" class="btn btn-danger" />
Here I can either save the record or delete it.
Then in my controller I do this:
if (Request.Form["delete"] != null)
{
// delete
}
else
{
// edit
}
So everything was working fine untill I added the jQuery Validation plugin and JQuery Validate Unobstrusive (which I needed for a Remote
validation).. it broke deletion of records in my application.
My Request.Form["delete"]
is now always null
. Note that Request.Form
does contain all the other values from the Form (and it used to work fine).
Anyone have some ideas how I can solve this issue?