0
我有Html.BeginForm认沽值转换成Html.BeginForm参数从输入文本
@using (Html.BeginForm("AddMeals", "ClientReservations",new { overallCost= $('#mealsOverallCost').value }))
我从下面输入文本阅读。
<div id="DivMealsOverallCost">
@Html.Label("Całkowity koszt", htmlAttributes: new { @class = "control-label col-md-2" })
<input type="text" id="mealsOverallCost" readonly="readonly" value="@ViewBag.OverallCost" />
</div>
是否有任何方法从输入字段获取值并将其传递到BeginForm。由我提出的阅读方式。
overallCost= $('#mealsOverallCost').value
不正确。