我需要在点击按钮后将@ html.label的值传递给控制器“Verificar”的变量“data”。将html.label的值传递给控制器
我所做的:
@Html.Label("modalTitle", new { id = "modalTitle" })
<button type="button" class="btn btn-defaultgreen" onclick="location.href = '@Url.Action("Verificar", "Feriado", new { date = @Html.Label("modalTitle", new { id = "modalTitle" }).toString() }, null)'">Create Event</button>
,但没有工作这种方法....需要你的帮助!感谢
你是什么意思“@ Html.Label的价值”?标签不是输入。从你提供的例子看来,你想要标签的标记,但为什么? – 2014-10-29 22:41:58
becouse我在javascript中使用FullCalendar v1.6.4:case“select”>> $('#modalTitle')。html(start.toString()。substring(0,15));将日期传递给@ html.label。现在我需要把这个日期传给我的控制器。 – 2014-10-29 22:53:44
'@ Html.Label()'给你的财产的名称,而不是它的值(我假设的日期)。包含您想要传递给控制器的日期的控件是什么? – 2014-10-29 23:02:31