What are the ReturnTypes of Action in Asp.Net MVC?
Pradeep Yadav
Return types of action method colud be json, view, partial view etc.
The following table shows the built-in action result types, ViewResult: Renders a view as a Web page. PartialViewResult: Renders a partial view ContentResult : Returns a string FileContentResult: Returns file content FilePathResult : Returns file content FileStreamResult: Returns file content EmptyResult: Returns nothing JavaScriptResult: Returns script for execution JsonResult: Returns JSON formatted data RedirectToResult: Redirects to the specified URL HttpUnauthorizedResult: Returns 403 HTTP Status code RedirectToRouteResult" Redirects to different action/different controller action