I have an IEnumerable
of managers Model.managers
from this I want to grab the ID
value which would be managers.manager_id
and the text
value which would be managers.manager_name
I also have a selected manager value at Model.SelectedManager
which holds the manager_id
What I am trying to do is to stuff all of these values into an Html.DropDownListFor
It would need to be a list of all of the manager_id
and manager_name
and then automatically select the manager stored at Model.SelectedManager
is this possible the way I have set it up?
public string SelectedManager { get; set; }
public virtual IEnumerable<managements> managers { get; set; }