1
变量的值,我需要的帮助:我想知道的,例如reception0
值:获得在剃刀
<td >
<label name="[email protected](i)">@Model[1][i]._tag</label>
</td>
<td>
<input type="text" value="@Model[1][i]._client" name="[email protected](i)"/>
</td>
<td>
<input type="text" value="@Model[1][i]._reception" class="datepicker" name="[email protected](i)"/>
</td>
<td>
<input type="text" value="@Model[1][i]._cloture" class="datepicker" name="[email protected](i)"/>
</td>
<td>
@Html.ActionLink("enregistrer","Index", new {identificateur = Model[1][i].Id, Pages = "1", _reception ="reception"+""+i.ToString(), _cloture ="cloture"+""+i.ToString(), _client ="client"+""+i.ToString(), tag = "tag"+""+i.ToString() })
</td>
我的问题是,我得到_reception = reception0
但我需要的reception0
不是它的名称值。
我该如何解决我的代码段?
它是在一个'for'声明,我对造成我很多问题 –
@Lamloumi使用您输入的值 - 你正在使用它的ActionLink的内已经为id。具体来说,使用'i'导致了什么问题? –
问题是我需要通过默认值Model [1] [i] ._ reception'或者在'如果我改变了代码,就像你说的那样,我总会得到旧的值 –