IE prompts to open or save json result from server

asp.net-mvc-3, internet-explorer, jquery

Solution

Sounds like this SO question may be relevant to you:

How can I convince IE to simply display Application json rather than offer to download

If not:

Have you tried setting the dataType expected in the ajax options? i.e. dataType: 'json'

Have you tried other content types such as 'application/json' or 'text/javascript'

Problem

Internet explorer in compatibility mode gets the data from the server in an ajax callback method, and pops-up a dialog if I want to save the data or open. How to get rid of that? client says: ``` $.ajax({ type:'POST', data: $("#UIdlgHolder > form").serialize(), url: $("#UIdlgHolder > form").attr("action"), success: function (data, textStatus, jqXHR) { { alert(data.message); } } ``` server answers: ``` return new JsonResult { Data = new { result = false, message = "Yay!" } }; ```

Original source

Related problems