Error logging:
<script type= "Text/javascript" > $ (Function () {$ (document). Off ("Ajaxsend"); Asynchronously uploads $ ("#Submit"). Click (function () {if ("#selectFileButton"). val () = = "") { return false; } $ ("#fileForm"). Ajaxsubmit ({success:function (msg, status) {h Idemask (); if (msg = = "") {msg = "Upload succeeded! "; $ ("#selectFileButton"). Val (""); } else {var regex = new RegExp ("\" "," G "); msg = Msg.replace (Regex, ""); msg = Msg.replace (/\|/g, "<br>"); } document.getElementById (' Uploadmessage '). InnerHTML = msg; } }); Showmask (); return false; Do not refresh the page}); }); ≪/script>
As the code above, asynchronously uploads the page. The values returned are displayed on the page in the Chrome browser. But under IE8 (the project needs to test only IE8), the return value becomes the download.
The reason for the query, which eventually locates on the response head that is returned asynchronously.
In response head here, Content-type is Application/json and will be downloaded under IE8.
Workaround:
var rs = Json ( message = message ); Rs. ContentType = "text/html"; Return RS;
such as the red font in the code above.
In the method that is returned asynchronously, the content-type of the response head that modifies the return value is text/html
ASP. NET MVC uses jquery.form.js asynchronous uploads the return value in IE is changed to a download solution