public ActionResult Search() { IEnumerable <PropertyType> propertyTypes = propertyBL.GetPropertyType(); IEnumerable <string> locationList = propertyBL.GetLocation(); ViewBag.propertyType = new SelectList(propertyTypes, "PropertyTypeID", "Type"); ViewBag.location = new SelectList(locationList); return(View()); }