我的视图中有两个列表框,带有四个箭头,用于在它们之间交换项目。我正在使用4个按钮,类型=“提交”并在控制器中处理它。有什么方法可以用回发来做到这一点吗?
<table style="width:90%; text-align:center">
<thead>
<tr>
<th>Unassigned State:</th><th>
</th><th>Assigned State:</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
@Html.ListBoxFor(model => model.UnAssignedSelected,
new MultiSelectList(Model.UnAssignedStates, "Id",
"Name", Model.UnAssignedSelected),
new { size = "6" })
</td>
<td valign="top">
<button style=" width:50px" name="button" value="oneRightArrow" type="submit"> > </button><br />
<button style=" width:50px" name="button" value="twoRightArrow" type="submit"> >> </button><br />
<button style=" width:50px" name="button" value="oneLeftArrow" type="submit"> < </button><br />
<button style=" width:50px" name="button" value="twoLeftArrow" type="submit"> << </button>
</td>
<td valign="top">
@Html.ListBoxFor(model => model.AssignedSelected,
new MultiSelectList(Model.AssignedStates, "Id",
"Name", Model.AssignedSelected))
</td>
</tr>
</tbody>