Pradeep Yadav
Explain types of ReturnTypes of Action Mehtods in Asp.Net MVC?
By Pradeep Yadav in ASP.NET on May 26 2017
  • Rajani Pandey
    Jan, 2018 7

    View result , partial view result , json result , javascript result , action result , filecontent result , redirecttoroute result , filepath result , empty result, redirecttoresult

    • 1
  • Pradeep Yadav
    May, 2017 26

    The following table shows the built-in action result types, • ViewResult: it renders a view as a Web page. • PartialViewResult: It renders a partial view. • RedirectToResult: It redirects to the specified URL. • RedirectToRouteResult: It redirects to different action/different controller action • ContentResult: It returns file string. • FileContentResult: It returns file content. • FilePathResult: It returns file content. • FileStreamResult: It returns file content. • EmptyResult: It returns nothing. • JavaScriptResult: It returns script for execution. • JsonResult : It returns JSON formatted data. • HttpUnauthorizedResult : it returns 403 HTTP Status code

    • 1
  • Rajeev Kumar
    Mar, 2023 31
  • Rajeev Kumar
    Mar, 2023 31

    As you can see, there are three categories of data types of ActionResult,
    Content Returning Results
    Redirection Results
    Status Results

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS