Hi we are trying to upgrade our project to work in the latest version of VS 2010 and i have encountered a problem with the old Data Annotations Modelbinder.
Dim modelBinder = New DataAnnotationsModelBinder()
modelBinder.InvalidValueFormatter = _ Function(propDescriptor As PropertyDescriptor, value As String, displayName As String) _ String.Format("'{0}' är ej ett korrekt värde för {1}.", value, displayName)
ModelBinders.Binders.DefaultBinder = modelBinder
What Im trying to do is to overide the default errormessage for wrong datainput ("The value '{0}' is not valid for the {1} field.)
I try to get the default modelbinder to assign it a new errormessage