TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Alpheus Lekgothoane
NA
79
8.2k
View With Switch case to Display for every Model
May 21 2019 11:44 PM
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
Reply
Answers (
3
)
Dynamic control from database in mvc 5
Reducing the URL HostName/Application into HostName in IIS