Two tables are there
1. Status_Master
a. Status_Id(Identity,Primary key)
b. Status_Desc.
c. Remarks
2. Role Master
a. Role_Id(Identity,Primary key)
b. Role_Desc
c. Status (wants for Dropdown list)
Here Model is [Status_Master_Model] Here Modelis [Role_Master_Model]
Question is in [Role_Master_Model] view i have to us Dropdown for column c i.e (Status) and bind the value from [Status_Master_Model] for column b i.e (Status_Desc.)
Help me with codes
Kunal GuptaPosted Jul 21, 2016, 7:35 AM
Nitin SontakkePosted Jul 21, 2016, 7:29 AM
Kunal GuptaPosted Jul 21, 2016, 6:57 AM
Nitin SontakkePosted Jul 20, 2016, 5:28 AM
Notice the commented line above. That was returning SelectList, but now it is return List that's why the error.
Kunal GuptaPosted Jul 20, 2016, 4:35 AM
Kunal GuptaPosted Jul 20, 2016, 4:32 AM
Kunal GuptaPosted Jul 20, 2016, 4:28 AM
Nitin SontakkePosted Jul 20, 2016, 4:27 AM
What is the error?
Nitin SontakkePosted Jul 20, 2016, 4:26 AM
Possible to post code of dc.SaveChanges()?
Kunal GuptaPosted Jul 20, 2016, 4:26 AM
Nitin SontakkePosted Jul 20, 2016, 4:21 AM
What do you mean by "I have codes"?
Do you have a source code?
Kunal GuptaPosted Jul 20, 2016, 4:20 AM
Kunal GuptaPosted Jul 20, 2016, 4:18 AM
Kunal GuptaPosted Jul 20, 2016, 4:15 AM
Nitin SontakkePosted Jul 20, 2016, 3:18 AM
Try not to get confused between the object model and db model. You can have StatusMasterModel as a property of RoleMasterModel. While saving send entire RoleMasterModel instance to aprocedure.
There you can retrieve all the information from these models and pass as a parameters to the stored procedure.
Kunal GuptaPosted Jul 20, 2016, 2:25 AM