意見:
@using (@Html.BeginForm("Show", "test", FormMethod.Post))
{
<fieldset>
<table >
<tr>
<td>
@Html.LabelFor(model=> model.Show)
</td>
<td>
@Html.TextBox("txtvalue", null)
</td>
</tr>
</table>
<input type="button" value="Show" onclick = "@("location.href='"+ @Url.Action("Show", "test")+"'" )" />
<input type="button" value="Go" onclick ="@("location.href='"+ @Url.Action("Go", "test")+"'" )"/>
</fieldset>
}
コントローラの 2 つのアクション メソッド、
public ActionResult Show(string txtvalue)
{
...
}
public ActionResult Go(string txtvalue)
{
...
}
どのボタンがクリックされたかに基づいて、対応するアクションメソッドに移動し、テキストボックスの値を渡す必要があります。
誰でも私にそれを行う方法を提案できますか。頭をぐるぐるまわしたが、わからなかった。