private IDictionary<int, String> GetAvailableHomeTypes() { var includeHomeTypes = new List<int> { (int)HomeType.New, (int)HomeType.Lease, (int)HomeType.Rent, (int)HomeType.RentWithLease, (int)HomeType.Apartment, (int)HomeType.Other }; return ModelProviderFactory.Get<IInfoModelProvider>().GetInfo(InfoObjectType.HomeTypeInfo) .Where(HomeTypeInfo=> includeHomeTypes.Contains(HomeTypeInfo.Key)) .ToDictionary(HomeTypeInfo=> HomeTypeInfo.Key, HomeTypeInfo=> HomeTypeInfo.Value); }
@Html.DropDownListFor(model => someId, new SelectList(yourDropDownCollection, "ID", "Name"), "== Select ==")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)