ASP.Net

Return String as ActionResult in ASP.Net MVC

Posted on Updated on

You can simply just use the ContentResult to return a plain text string:

public ActionResult Temp() {
return Content("Hi there!");
}