Thursday, September 11, 2014

Get The Drop On ASP.NET MVC DropDownLists

Get The Drop On ASP.NET MVC DropDownLists




 DropDownLists in ASP.NET MVC seem to cause a fair amount of confusion to developers fresh from Web Forms World. This article looks to provide you with all (well, most) of what you need to know to get your DropDownLists working in ASP.NET MVC.    

DropDownList, ComboBox, call it what you like, but it always renders as an html select element. It has an opening tag. In between, each "ListItem" is housed within an elements for logical separation of related options. If you provide a value attribute to an option, that is the value that gets posted back when a form housing the select element is submitted. If you omit the value attribute, the text value of the option gets posted back.

read Detail Get The Drop On ASP.NET MVC DropDownLists

No comments: