我有一个链接,可以在新窗口中打开 pdf,而无需离开页面。我有这个链接工作......
<script type="text/javascript">
$(function () {
$("#DatePicker").mask("99/99/9999").datepicker({ maxDate: new Date() });
});
if (document.images) {
var pic1 = new Image(100, 200);
pic1.src = '<%=Url.Content("~/images/calendarContent.png") %>'
}
</script>
<%= Html.ActionLink("Click ME", "Controller", "Home", new { id = Model.id }, new { onclick = "stayHomeFunc()"})%></div>
经过审查,我必须添加一个 DatePicker 函数,允许用户选择一个日期。如何将该日期选择传递给我的控制器?这就是我到目前为止所拥有的,顺便说一句,它返回一个空 startDate ......
Enter Date:<input name="DatePicker" id="DatePicker" type="text" style="width: 80px" />
<%= Html.ActionLink("Click ME", "Controller", "Home", new { id = Model.id, startDate = DatePicker }, new { onclick = "stayHomeFunc()"})%></div>
public ActionResult COntroller(string id, string startDate){...}
有任何想法吗?提前致谢...