0
public ActionResult Countries(int id=0, int from=0)
我的控制器和返回國家的ActionResult。如何調用ActionResult在MVC中再次獲取數據
現在:
@foreach (var item in Model.Matches)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
</tr>
}
我的看法,我怎麼說從+ = 10,使ID保持不變,如它是現在打開的網頁的ID,並只取10個國家D B?
@Html.ActionLink("next", "Countries", Model.From += 10)
這不起作用
您必須擴展您的模型並使用Html.HiddenFor()在您的視圖中添加隱藏字段。 – Robert 2015-02-10 13:20:39
你可以請更好的解釋一下,或者聯繫我一個教程? – 2015-02-10 13:22:32