the source of LoginRegister view is like this :
@Html.Partial("authentication/_login")
@Html.Partial("authentication/_register")
and each child view has got a form with this syntax
@using (Html.BeginForm(**seperated-methods**, "Login"))
{
@Html.ValidationSummary(false)
}
I send error(s) in postback whit this code
ModelState.AddModelError("", "**any-error-message**");
return View("authentication/LoginRegister", customized-data);
The point is , error message shows in both partial views.
You need to tell the ModelState to which property this error refer to:
Now it will be only in the
If you don’t specify the property name, the error will be considered global and get shown in every
ValidationSummary.