我有一个 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" } )