參考以下地址:
https://www.it1352.com/48944.html
作者的說法如下:
“You can’t redirect in an AJAX action from the server. If you want your browser to redirect in an AJAX action you need to do it from javascript. Obviously using AJAX to redirect is absolutely useless. If you intend to redirect use a normal Html.Begin form and don’t bother with AJAX.”
所以,如果需要異步請求處理數據後跳轉到其他頁面,需要在前端收到請求結果後再做進一步處理。
以上問題是在開發中遇到的,百度搜索不盡如人意,看到這個文章後將作者的解決方案放在這裏以做記錄。