-1
我有一個cshtml
問題:我有這樣的片段:級聯
@for (int i = 0; i < 25; i++)
{
<tr>
<td>
<input class="myCell" type="text" name ="num"@i/>
</td>
<td>
<input class="myCell" type="text" name="client"@i/>
</td>
<td>
<input class="myCell" type="date" name ="reception"@i/>
</td>
<td>
<input class="myCell" type="date" name="cloture"@i/>
</td>
</tr>
}
,我想重新命名的第一個輸入num0
,client0
.....直到最後輸入num23
,client23
...,我嘗試上面的代碼片段,但沒有奏效。
爲什麼代碼不起作用?我該如何解決它?
** **是如何工作的?發生了什麼? – SLaks
閱讀生成的來源。 – SLaks
name =「cloture @(i)」 – phillip