I have following ViewModel containing "NumberOfAdults" fields.
public class SearchView
{
public int NumberOfAdults { get; set; }
// More fields...
}
Assuming it will have some value (lets say 5) populated from some configuration file and I have a strongly typed View. What is the best way to populate a dropdown containing text and values of 1,2,3,4,5 without hard coding <Select...><Option value="1">1</Option></Select>? Is there a MVC way of doing it?