What are different types of results in MVC?

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.
7. JavaScriptResult->Returns a piece of Javascript code that can be executed on the client.
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.
Check out Best Alternative to InfoPath -> Try Now


New to Office 365 SharePoint Online? Get Office 365 Enterprise E3 Subscription & Try out all the features

(Installation & Features)

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →