0
我有一個html表生成在我的視圖中,沒有人知道任何助手可用,我可以使用,以便其中一個字段可以編輯內聯。MVC Html助手使標籤可編輯
查看:
<table>
<caption>Configuration values for current management group</caption>
<thead>
<tr>
<th scope="col">Device Type</th>
<th scope="col">Section</th>
<th scope="col">Name</th>
<th scope="col">Value</th>
<th scope="col">Operation</th>
</tr>
</thead>
<tbody>
@foreach (var param in Model.ParamData)
{
<tr>
<td>@param.DeviceType</td>
<td>@param.Group</td>
<td>@param.Name</td>
<td>@param.Value</td>
<td>@(param.IsMerge ? "Merge" : "Delete")</td>
</tr>
}
</tbody>
</table>
正如你可以看到有什麼特別在這裏,我想編輯欄會以類似的方式工作,以網頁形式的GridView。唯一要編輯的字段將是值,並且它始終是一個文本框。
我確信人們必須在已經這樣做了,但香港專業教育學院在網上看到的唯一的例子是爲MVC 1
我可以使用jQuery敲東西了,但我肯定有一定的例子已經負載和不想要重新發明輪子。