基本问题: 我有模型中的字符串列表
@Html.DropDownListFor(m=>m.Name,new SelectList(Model.fullCourse));
在视图中我可以绑定列表值:
<select data-bind="options:info2, optionsCaption:'Choose', value:chosenInfo "></select>
<script type="text/javascript">
function AppViewModel() {
this.info2 = ko.observableArray(@Html.Raw(Json.Encode(Model.fullCourse)));
或使用Knockout viewModel:
this.chosenInfo=ko.observable();
};
ko.applyBindings(new AppViewModel());
</script>
@Html.ActionLink("View Details", "about", "Home", ??????, null);
现在:我正在尝试将选择值传递给另一个视图:
@ViewBag["mydata"]=????
或者:非常感谢