Saturday 15 January 2011

drop down menu - ASP.net MVC how to get the value of the ID field for the list of items? -


I have an application that shows a list of items related to typed models.

Each item in the list has an ID from a lookup table.

How is the value of the lookup data for each item displayed instead of the id?

The best way is to link an HTML dropdown list to each ID, from which I can select the appropriate value.

Thanks in advance

Gabriel

well The first step is to ensure that you get all the prices that are in DropDownList, you should be able to get it easily from your database.

Set the text of the dropdown list item to the text value for the lookup item, and set the value of the same item ID.

When creating a dropdown list, make sure that a selected option matches the id of your modeled data item.


No comments:

Post a Comment