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


Rupesh KahaneRank #136 · 16.4K reputationPosted May 22, 2019, 4:08 AM EDT
Sivakumar KonetiRank #1,556 · 1K reputationPosted Jun 17, 2019, 4:00 AM EDT
Alpheus Lekgothoane68 reputationPosted May 22, 2019, 7:41 PM EDT