Thanks in advance.
How to pass multiple dropdown list values from view to controller and saving into a database?
129404-May-2017
I am having difficulty in passing multiple dropdown list values from view to controller and saving data into a database. Please help me.
Manish Kumar
04-May-2017First we create database and table
Countrylist table for first dropdown
DistrictList table
And Statelist table
And Registrationform table
Now add New Project and Right Click on the Models folder and select Ado.Net Entity Data Model
And the click generate From Database
And next and then give connection information and select your database.
Then choose tables and then finish.
In the next step we will create Home Controller for adding controller right click on the controllers folder and go to add and then click controller then a pop up will be appear from here you can change you can give your controller name .
In the controller copy the following code.
And in the view
View page Look like