0
我需要一個ASP.NET MVC4 Ajax表單與一個提交按鈕和DropDownLists張貼在變化。ASP.NET MVC4手動AJAX後wihtout驗證
問題是,當我使DropDownList更改時手動ajax帖子我想關閉JavaScript驗證。
當我在SelectedShiftModel中更改選擇時,這是響應,但只有在單擊提交按鈕時才需要此選項。
我做手工阿賈克斯後這樣說:
$(document).ready(function() {
$('#SelectedShiftModel').change(function() {
var postData = $("#PostData").serialize();
$.post("Create", postData, function (data) {
$('#Fields').html($(data).find('#Fields').html());
});
});
});
ModelState.Clear(); < - 這使它。 – jannagy02
很高興幫助。 – hjgraca