Qus:    What is diferent types of Action result in MVC?
Dec 01, 2020 15:00 3 Answers Views: 89 SWEETY

 The different types of Action Result in MVC are as follows -



1. ViewResult

This return type is used to return a webpage from an action method.



2. PartialViewResult

This return type is used to send a part of a view which will be rendered in another view.



3. JsonResult

This return type is used when we want to return a JSON message.



4. JavaScriptResult

This return type is used to return JavaScript code that will run in the browser.



5. EmptyResult

This return type is used to return nothing (void) in the result.



6. ContentResult

This return type is used to return HTTP content type like text/plain as the result of the action.



7. RedirectResult

This return type is used to redirect to any other controller and action method depending on the URL.



8. RedirectToRouteResult

This return type is used when we want to redirect to any other action method.



9. FileResult

This return type is used to send binary output in response.

Prev Next
Answers (3)
SHIVA Dec 02, 2020 08:28
Answer:   View ,PartialView ,File,Redirect,Content,Json and redirectToRoute. This help to achieve the different set of actionresult in MVC . It will implement in the controlaction method and in order to achieve these method.

SHIVA Dec 02, 2020 08:29
Answer:   View ,PartialView ,File,Redirect,Content,Json and redirectToRoute. This help to achieve the different set of actionresult in MVC . It will implement in the controlaction method and in order to achieve these method.

PARTH Dec 03, 2020 08:24
Answer:   The different types of Action Result in MVC are as follows -

1. ViewResult
This return type is used to return a webpage from an action method.

2. PartialViewResult
This return type is used to send a part of a view which will be rendered in another view.

3. JsonResult
This return type is used when we want to return a JSON message.

4. JavaScriptResult
This return type is used to return JavaScript code that will run in the browser.

5. EmptyResult
This return type is used to return nothing (void) in the result.

6. ContentResult
This return type is used to return HTTP content type like text/plain as the result of the action.

7. RedirectResult
This return type is used to redirect to any other controller and action method depending on the URL.

8. RedirectToRouteResult
This return type is used when we want to redirect to any other action method.

9. FileResult
This return type is used to send binary output in response.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect