Hi, everyone is possible to write a single view with Switch case having all controls and display those controls on the view depending on the Model Properties
Let Say I have the following properties and Models
- public class Employee{
- public int Id {get; set;}
- public string Name {get; set;}
- public string Email {get; set;}
- }
- and another class
- public class Department{
- public int Id {get; set;}
- public string DepartmentName {get; set;}
- }
then if I want to have two forms from the View Employee form and Department for example is it possible to write one View with all controls so that when I click Employee only controls for Employee appear on screen same applies to Department or any other Model using one view.
Thanks