-1
我有兩種形式。每個表單都鏈接到其各自的ActionMethod。首先成功發佈相應ActionMethod的帖子,但不發佈到其各自的ActionMethod,而是發佈到第一個表單ActionMethod。生成的HTML是:HttpPost方法不張貼
<div id="tabs-ViewBranch">
<h2>Districts</h2>
<p>
<a href="/cityDistrict/createDistrict">Create New</a>
</p>
<form action="/cityDistrict/deletedDistricts" method="post"><p>
<select id="Status" name="Status" onchange="
var form1 = document.forms[0];
form1.submit();"><option value="0">Show Active</option>
<option value="1">Show Deleted</option>
</select>
</p>
</form><table class="table">
<tr>
<th>
name
</th>
<th>Actions</th>
</tr>
<tr>
<td>
Gujranwala
</td>
<td>
<a href="/cityDistrict/editDistrict/4">Edit</a> |
<a href="/cityDistrict/deleteDistrict/4">Delete</a>
</td>
</tr>
</table>
</div>
<div id="tabs-AddBranch">
<h2>Cities</h2>
<p>
<a href="/cityDistrict/createCity">Create New</a>
</p>
<form action="/cityDistrict/deletedCities" method="post"> <p>
<select id="Status" name="Status" onchange="
var form = document.forms[0];
form.submit();"><option value="0">Show Active</option>
<option value="1">Show Deleted</option>
</select>
</p>
</form> <table>
<tr>
<td>
No cities exists.
</td>
</tr>
</table>
</div>
</div>
一切運行除了第二種形式是不是張貼到deletedCities
,並且相當張貼到deletedDistricts
罰款。有人能指導我哪裏出錯嗎?
真棒解釋。謝了哥們。它的工作就像一個魅力。 – Jogi