So im obtaining a dropdown list via Knockout and a array json result, like this
@Html.DropDownListFor(m => m.SelectedGodClubID,
(SelectList)Model.clubIDlistItems, new
{
id = "ctid",
data_bind = " options: DynamicClublist, optionsText: 'ClubType', optionsValue: 'ctid'",
})
I would now like to bind this to a string to then use on another controller, and im stuggleing to figure this out
Im trying to use this and then read the vlaue
public static string selectedNewClubID(loggedinViewModel model, clubID[] clubid, string exit)
{
exit = model.SelectedGodClubID = clubid[int.Parse(model.SelectedGodClubID) - 1].Club_ID;
return exit;
}
}
any help ?