When reading on ASP.NET MVC, I came across some great validation examples when business rules were associated with a model, and the user interface simply displayed a set of errors and flagged form elements associated with invalid input. I think it makes sense to stick to this logic in one place, and not in every form, to do your own unique check.
Is it possible to achieve this separation in an elegant way using the ASP.NET Web Application project (web forms)? I can save validation rules at the business logic level, and I can have methods that perform validation and return a set of errors. But I cannot figure out how to put the problematic controls on the user interface side correctly.
In MVC, elements and a form model are implicitly bound by property names. Should the ASP.NET user interface refer to unique model property names (either as an identifier / name, or as a user attribute)? Should the user interface have access to manually created property name management name mappings?
source
share