Q:

do you want to open or save from localhost while trying to upload the file

I am trying to upload the file on certain path.
I have written following code for this:
                        try
                        {
                            if (!System.IO.Directory.Exists(fileLocation))
                                System.IO.Directory.CreateDirectory(fileLocation);

                            // file.SaveAs(completefilepathWithFile);
                            file.SaveAs(FileLocationToSaveInDB);
                            return Json("File Uploaded Sucessfully");
                        }
                        catch (Exception)
                        {
                            return json("Failed to upload the file");
                        }

This code works fine for Firefox and crome.
But gives me error for IE9.
It prompts me for:
Do you want to openor save (methodname) from localhost?

Its as below:

I tried with:
localhost doesn't open in IE9
But didnt helped.
Please help me.

A:

Many browsers can't handle application/json as the return content type.You can hack the response and sent back the content using the mime type text/html.
try this: 
return Json("FileUploaded successfully", "text/html", System.Text.Encoding.UTF8,
                    JsonRequestBehavior.AllowGet);

