In ASP.NET MVC the convention is that a controller action method should return an ActionResult
(or a type derived from ActionResult
).
However, you can write a public method that returns pretty much anything and if that method is called (from a browser) the framework will package the return value up as a ContentResult
and the browser receives a page of plain text.
This is all very interesting - but would you ever want to do this?