我有一个控制器“myController”,它有一个名为“printDetails(string id)”的函数我有一个视图调用
@Model.myControllers
//I output files here and user can download to a file, or by selecting an item from the drop down menu and pass it to the function "printDetails"
html.actionlink("download","printDetails")
html.dropdownlist("fromdb",null,"--select--", new{onchange="myJSFunction(fromdb)"})
<script>
myJSFunction(fromdb)
{
//how do i pass "fromdb" as a paramenter to "printDetails?id=fromdb" //myController/printDetails
}
</script>
感谢您的所有回复。