So, I make the registration page in ASP.NET MVC, and theres is a list of fields that change depending on a number of conditions (taken from the database).
What would be considered the best approach for displaying these fields in a view with no code changes every time the database is updated.
The current system that I think of is compiling a dictionary with the name "Name, DataType" and then iterating over the list and placing a new input type for each name (using the switch for the data type to get the correct editor). But this is similar to the old-fashioned and not fully taking advantage of the .NET MVC system (such as validation, default values, custom editors for specific content).
Is there any approach that I may not know in .NET to solve this problem?
source
share