MVC4将@Html.DropDownList的SelectedItem值传递给@ Ajax.ActionLink

时间:2013-07-23 21:05:47

标签: asp.net asp.net-mvc-4 html-select html.actionlink

我有一个DropDownList,我想将所选值传递给ActionLink。如何提取所选值?

@Html.DropDownList( "DataCollectionsList", (SelectList)ViewBag.AvailableDataCollections, new { onChange = "runAlert();"} )
@Ajax.ActionLink( "test123", "AddDataCollection", new { reportId = Model.ReportId, dataCollectionId = **INSERT SELECTED DROPDOWN VALUE HERE** }, new AjaxOptions { InsertionMode = InsertionMode.Replace, UpdateTargetId = "test123" } )

0 个答案:

没有答案