0
我已經從使用IE7轉換爲IE9,不幸的是我的部分視圖被返回並用部分視圖覆蓋整個頁面。部分視圖僅在ajax調用後才加載
上點擊HTML按鈕做的,我叫了一個
在javascript中:
$.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)如果AJAX是通過鏈接點擊或觸發形式提交,請確保您〔如取消行動](http://stackoverflow.com/questions/9370286/disable-href-after-clicking-ajax-js)2)確保你沒有'_layout.cshtml'在你的部分。 – StuartLC