Automatic Marking of Required Fields with EditorEntryFor

Using an EditorEntryFor helper makes the code DRYer and opens new possibilities, such as automatic indication of required fields. A small addition in one helper method will mark all required fields in entire MVC web application. It’s more or less standard to indicate required fields in a form with a red * next to the… Continue reading Automatic Marking of Required Fields with EditorEntryFor

DRYing MVC Forms with an EditorEntryFor Helper

When creating forms in ASP.NET MVC I use a small helper to keep the code DRY (Don’t Repeat Yourself). The EditorEntryFor helper creates everything needed for a form field – the label, the input and the validation. When creating line of business applications, a huge part of the coding is often to create forms. Each… Continue reading DRYing MVC Forms with an EditorEntryFor Helper