C# 在razor中获取标记的值
我需要帮助:我需要知道的值,例如C# 在razor中获取标记的值,c#,asp.net,.net,asp.net-mvc,razor,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> <inpu
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>
@型号[1][i]。\u标签
@ActionLink(“enregister”,“Index”,new{identicateur=Model[1][i].Id,Pages=“1”,_receivement=“receivement”+“”+i.ToString(),_cloture=“cloture”+“”+i.ToString(),_client=“client”+“”+i.ToString(),tag=“tag”+“”+i.ToString())
我的问题是我得到了\u receipt=receiption0
,但我需要的是receiption0
的值,而不是它的名称
如何修复我的代码段?使用链接帮助器中用于输入的值
@Html.ActionLink( ... , _reception = Model[1][i]._reception, ... )
@Lamloumi-您已经在ActionLink中为id使用了它。具体来说,使用
i
会导致什么问题?问题是,我需要更新默认值模型[1][i],例如\u receipt
._接收
或通过输入新值,如果我按照您所说的更改代码,我将始终得到旧的values@Lamloumi-在服务器端显示信息。它集成到http管道中运行,特别是在响应期间。当用户查看razor的信息输出时,内容是静态的。为了在用户与任何内容交互时使其动态化,您必须使用javascript的客户端方法。您是否有获取每个标记值的脚本建议?