在剃刀中获取标签的价值

时间:2013-10-07 17:01:59

标签: c# asp.net .net asp.net-mvc razor

我需要帮助:我需要知道例如reception0的价值:

  <td >
    <label name="tag@(i)">@Model[1][i]._tag</label>
  </td>
  <td>
    <input type="text" value="@Model[1][i]._client" name="client@(i)"/>
  </td>
  <td>
    <input type="text" value="@Model[1][i]._reception"  class="datepicker" name="reception@(i)"/>
  </td>
  <td>
    <input type="text" value="@Model[1][i]._cloture"  class="datepicker" name="cloture@(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的值而不是它的名字。

如何修复我的代码段?

1 个答案:

答案 0 :(得分:0)

在链接助手

中使用您用于输入的值
@Html.ActionLink( ... , _reception = Model[1][i]._reception, ... )
相关问题