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!");
}

Leave a Reply

Your email address will not be published. Required fields are marked *