We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DropDownListFor question


I'm migrating a project in asp webforms into mvc.

I've a form with a lot of drop down list. In webForms, define the control and bind the class is easy:

<asp:DropDownList ID="ddlPlanOcupacion" CssClass="combo" runat="server" SelectMethod="GetPlanesOcupacion" DataTextField="Nombre" DataValueField="IdPlanOcupacion" SelectedValue='<%# BindItem.BloqueInicial.IdPlanOcupacion %>' > </asp:DropDownList>

But in MVC, I need a lot of lines for create and bind the control


Is not there an easier way to create and bind with the model the dropdownlist?


1 Reply

GG Gopi Govindasamy Syncfusion Team January 2, 2017 01:11 PM UTC

Hi Manolo,  
Thanks for using Syncfusion products. 

We have checked your scenario for “create and bind with the model the dropdownlistFor”, Already we have document for this requirement please refer the below help document. 

Hope the above document helps to create easy way. 

Please let me know if you have any concerns. 

Gopi G 

Live Chat Icon For mobile
Up arrow icon