我正在MVC4中以模式弹出窗口的形式打开局部视图。并且我在弹出窗口中使用Html.Beginform post方法来发布页面。在Chrome和Firefox上都可以正常工作,但是当我单击Submit按钮时没有任何反应在IE 11中
我尝试删除Cookie,临时文件,bin,调试。 建筑,清洁,重建解决方案 重新启动VS
@using (Html.BeginForm("submitNotes", "Review", FormMethod.Post))
{
@Html.AntiForgeryToken()
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Enter Notes</h4>
</div>
<div class="modal-body">
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.HiddenFor(model => model.ID)
<div class="form-group">
@Html.LabelFor(model => model.Notes, htmlAttributes: new { @class = "control-label col-xs-2" })
<div class="col-xs-10">
@Html.TextAreaFor(model => model.Notes, new { @class = "form-control", @id = "txtNotes" })
@Html.ValidationMessageFor(model => model.Notes, "", new { @class = "text-danger", @id = "ValidationMessageForComments" })
</div>
</div>
</div>
<div>
<div class="modal-footer">
<input type="submit" value="Save" id="Save" onclick="javascript:return NotesValidater();" class="btn btn-primary" />
<input type="button" value="Close" class="btn btn-primary" data-dismiss="modal" />
</div>
</div>
<script type="text/javascript">
function NotesValidater() {
var txtNotes = document.getElementById("txtNotes");
var txtNotesval = txtNotes.value.trim();
if (txtNotesval == "") {
alert("Please enter Notes");
return false;
}
return true;
}
</script>
}