IE7에서 IE9로 변환했으며 불행히도 내 부분 뷰가 반환되고 부분 뷰가 전체 페이지를 덮어 씁니다. HTML에서 버튼을 클릭상의를하는부분 뷰는 ajax 호출 후에 만로드됩니다.
, 나는 자바 스크립트에서
를 불러 :
$.ajax({
type: "POST",
url: $('form').attr('action'),
data: $('form').serialize(),
dataType: "text",
success: function (response) {
alert('Pass'); // This will be hit
},
error: function (errorObj) {
alert('Error');
}
});
를이 다음 컨트롤러로 이동 :
[HttpPost]
public ActionResult Index(Index model)
{
return NewFeature(model);
}
[HttpPost]
public ActionResult NewFeature(Index model)
{
return PartialView("_feature", model);
}
어떤 생각이 무엇을 될 수 있니?
1), 반드시 [예를 들어, 확인 액션을 취소하십시오] (http://stackoverflow.com/questions/9370286/disable-href-after-clicking-ajax-js) 2) 당신의 부분에'_layout.cshtml'이 없는지 확인하십시오. – StuartLC