Ali Ghaffari

Ali Ghaffari

  • 1.5k
  • 665
  • 23.5k

Login Form with Dropdownlist in mvc with EF

Sep 6 2017 9:21 AM
Can anyone know? actually i am making login form in mvc using entity framework.
I have a table(User) in database. In this table i have only UserType, UserName and password.
I want a one thing, i have dropdownlist on login view page for User Type: like Admin, Teacher, Student will be showing in dropdownlist for select.
When I want to select Teacher from dropdownlist and enter the username and password and click on #Login Button then Dashboard of Teacher should be open.
but here conflict is that how to show the User Types in dropdownlist and then how to match with database in mvc entity framework.


Answers (4)