I'm developing an asp.net mvc 5 application and need some help

Suppose the following model :

public class EmployeeMaster
    public int Id { get; set; }
    public string Name { get; set; }
    public string F1 { get; set; }
    public string F2 { get; set; }
    public string F3 { get; set; }
    public string F4 { get; set; }
    public string Email { get; set; }

At the admin panel, the administrator will set the number of text boxes and their corresponding labels, that are going to saved in the database in another table, For instance : (TextBoxLabel). These variations of text boxes and labels occur for each user's account, that has been assigned a system code. Now, suppose if the administrator wants to assign 2 text box fields and their labels, so, he would simply go to the admin area and inputs it what he desires, now at the user's end (above model), it should simply display 4 textboxes namely (Name, F1, F2 and Email) neglecting the other two, F1 and F2 have their own labels that are to be fetched from database from TextBoxLabel table, that means that when the user submits the form the column F1 and F2 gets populated, and F3 and F4 will have null values.

Now my question is that how do I achieve the above scenario, what could be the simple and the best way to achieve this, an example would be deeply appreciated. Thanks in Advance :)

Related posts

Recent Viewed