I am doing a tutorial on ASP.Net MVC framework. I use Visual Studio Express and run on Intenet Explorer.
I created a new controller named CuisineController and I defined an ActionResult method named Search:
public class CuisineController : Controller
{
//
// GET: /Cuisine/
public ActionResult Search(String name = "French")
{
var message = Server.HtmlEncode(name);
return Json(new { Message = message, Name = "Scott" }, JsonRequestBehavior.AllowGet);
}
}
In the video of the tuturial when clicking on the url: "http://localhost:{portNumber}/cuisine/french" -> The json is displayed on the screen. In my case, I got a question from the browser: "Do you want to open of save french.json from localhost?"
Why the browser doesn't display the json instead?