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
Le Tuan
NA
4
586
Binding two entities to dropdownlist in one view
May 2 2018 9:22 AM
Hi all,
I am a newbie MVC5 and Entity Framework 6.
I have 3 tables: Employee (id (pk), name, departmentID(fk), jobtileID(pk),...), Department(departmentID(pk), name,...) and Jobtile(jobtitleID(pk), titleName,...).
I would like to buitd a website to allow users to add employee to the database.
The website has a view to list all Employee using EF with these information: id, name, departmentName, titleName,...) in a table.
When an user selects Add new button, a new view allows user to add name,
select an department from dropdownlist
and
select jobtile from another dropdownlist
.
While the user selects Edit button a view allows user to edit Employee Information as employee name, department and jobtitle display correctly in edit view.
I want to
use zaror to bind data to dropdownlist using dropdownlistfor
.
How to solve this problem. Thank in advanced.
Reply
Answers (
1
)
Newsletter Subscribe in Asp.Net
CRUD Operations in MVC4