so i need to use dropdownlistFor
@Html.DropDownList("Designation_Id", new SelectList(ViewBag.Designation, "Designation_Id", "Designation_Text"), "Please select", new { @id = "ddlDesignation", @class = "btn form-text" })
how can i write the above state for dROPDOWNLISTFOR or can i send the value of dropdown using dropdownlist to the controller as my controller is taking an object class like below kindly assits me
Sonu GuptaPosted Aug 20, 2019, 1:29 AM
Junaid ShahidPosted Aug 20, 2019, 1:08 AM
pubic int DesignationId {get;set;}
Mark TaborPosted Aug 19, 2019, 10:38 PM
instead of Designation_ID i put model=>model.Designation , Now it is getting the correct value but when submitting the for i am getting this error message as shown below.
Bidyasagar MishraPosted Aug 19, 2019, 10:17 PM
Jignesh KumarPosted Aug 19, 2019, 9:21 PM
Bidyasagar MishraPosted Aug 19, 2019, 8:13 PM
Mark TaborPosted Aug 19, 2019, 11:21 AM
Sagar MaldePosted Aug 19, 2019, 7:56 AM
Chittaranjan SwainPosted Aug 19, 2019, 5:27 AM