Value cannot be null. Parameter name: items (DrodownList)
Consider the case when model validation fails. View will be redisplayed again with model sent with the request. However this line: new SelectList(ViewBag.Districts, “district_id”, “district_name”, Model.Districts) will have null as a first parameter, since ViewBag.Districts was not repopulated, causing the exception. So in order to avoid exception just set this property again: // If we … Read more