In this article I will explain with an example, how to use Response.Write in ASP.Net Core MVC.
Response.Write function is not available in ASP.Net Core and hence this article will illustrate how to do similar functionality in ASP.Net Core MVC.
Note: For beginners in ASP.Net MVC Core, please refer my article ASP.Net MVC Core Hello World Tutorial with Sample Program example.
 
 
Controller
The Controller consists of the following Action method.
Action method for handling GET operation
Inside this Action method, the string message is sent to the Client using Content function.
Note: The Content function sends the data to the Response similar to Response.Write function.
 
public class HomeController : Controller
{
    public IActionResult Index(ControllerContext context)
    {
        return Content("Hello MVC Core!");
    }
}
 
 
Screenshot
Using Response.Write in ASP.Net Core
 
 
Downloads