I have this in my edit controller:
playerView.Users = new SelectList(repo.GetUsers(), "UserID", "UserName", player.User.UserID.ToString());
and this is how looks my dropdownlist:
@Html.DropDownListFor(x => x.SelectedUserID, Model.Users)
@Html.ValidationMessageFor(x => x.SelectedUserID)
But I can´t get that selected user to my view (I always get first item in dropdownlist). In player.User is User with id, name, ... I tried UserID with or without ToString, UserName or just User but nothing helps. Thanks