I have view with multiple submit button in ASP.NET MVC and I want validate the form using data annotations, but when user clicks on a particular button, not all submit button, validation must be performed with particular button not all button on view.
@using (Html.BeginForm("Index", "Skill", FormMethod.Post))
{
@Html.ValidationSummary(true)
@Html.AntiForgeryToken()
@Html.TextBoxFor(model => model.SkillName)
@Html.HiddenFor(model => model.SkillId)
@Html.ValidataionSummaryFor(model => model.SkillName)
<input type="submit" name="AddAction" value="Add" id="btnAdd"/>
<input type="button" name="btnreset" value="Reset" />
}
I want that validation will apply only on Add button not on Next button or any button