I code a .getJSon, It does the job but I get IE to asked to download the file. Here is the code
<script type="text/javascript">
$(function() {
$('#id').click(function() {
var dateReport = "01/01/2009";
$.getJSON('/Report/SendReport', { date: dateReport},
function(response) {
if (response.result == "OK") {
$('#OKSendReport').toggle();
$('#OKSendReport').html("OK");
}
});
});
});
The code in the controller is
public ActionResult SendReport(string date) {
//DO Stuff
return new JsonResult {
Data = new { result = "OK" }
};
}
Any ideas?