1. The controller action are public and can be invoked by an URL request.
2. The controller actions can return a view, file etc. These return types are referred as action results.
3. The action results in MVC are defined under the base class 'ActionResult'.
4. The various types of action results and their helper methods are defined below:
2. The controller actions can return a view, file etc. These return types are referred as action results.
3. The action results in MVC are defined under the base class 'ActionResult'.
4. The various types of action results and their helper methods are defined below:
Action Results
|
Helper Method
|
ViewResult
|
View()
|
PartialViewResult
|
PartialView()
|
RedirectResult
|
Redirect()
|
RedirectToRouteResult
|
RedirectToAction()
|
ContentResult
|
Content()
|
JsonResult
|
Json()
|
JavascriptResult
|
Javascript()
|
FileResult
|
File()
|
EmptyResult
|
None
|
No comments:
Post a Comment