In this post, we will discuss various results in MVC.
Also, you can check out my previous posts on:
There are so many types of results in MVC. These are given below:
1. ViewResult->Renders a specified View to the response stream.
2. PartialViewResult->Renders a specified partial view to the response stream.
3. EmptyResult->An empty response is returned.
4. RedirectResult->Performs an HTTP redirection to a specified URL.
5. RedirectToRouteResult->Performs an HTTP redirection to a URL that is determined by the routing engine based on given route data.
6. JSONResult->Serialises a given Viewdata object to JSON format.
8. ContentResult->Writes Content to the response stream without requiring a view.T he content result lets you define whatever content you wish to return.
9. FileContentResult->Returns a file from a byte array to the client.
10. FileStreamResult->Returns a file from a stream to the client.
11. FilePathResult->Returns a file from the server’s physical location to the client.