Here is the code I am using to setup the form:
<% using (Ajax.BeginForm("SaveCroppedPhoto", new { Id = Model.memberId.GetValueOrDefault() }, new AjaxOptions
{
OnBegin = "ProfileOnBegin",
OnComplete = "ProfileOnComplete",
OnFailure = "ProfileOnFailure",
OnSuccess = "ProfileOnSuccess"
}, new { id = "cropPhotoForm" })) {%>
My action result returns a json result as follow:
return Json(new { success });
In IE8 when the action returns, it tries to download the result. The content type coming back is application/json. Anyone have any idea how to stop IE from trying to download the result?
Some additional info: I just noticed in fiddler that when I am saving, two requests are made to the action. Trying to figure that out now. I am guessing that is the cause of the problem.