Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Controller
- public ActionResult Register()
- {
- RegisterViewModel viewModel = new RegisterViewModel
- {
- Districts = _unitOfWork.DistrictRepository.GetAll(),
- };
- return View(viewModel);
- }
- //View
- @Html.DropDownListFor(m => m.DistrictId, new SelectList(Model.Districts, "District_ID", "Name"), new { @class = "browser-default" })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement