16
Answers

how to get drop down list in MVC 4

Kunal Gupta

Kunal Gupta

8y
511
1
Two tables are there
 
1. Status_Master
                                                                             2. Role Master
a. Status_Id(Identity,Primary key)                        a. Role_Id(Identity,Primary key)                 
b. Status_Desc.                                                    b. Role_Desc
c. Remarks                                                            c. Status     (wants for Dropdown list)
 
Here Model is [Status_Master_Model]                    Here Model is [Role_Master_Model]
 
Question is in [Role_Master_Model] view i have to us Dropdown for column c i.e (Status) an d bind the value from [Status_Master_Model] for column b i.e (Status_Desc.)
 
Help me with codes....as i  am doing in [Role_Master_Model]..[<td >@Html.TextBoxFor(m => m.Status)</td>]..as stated in red one..errror is coming as [Role_Master_Model] does not contain its defination

Answers (16)