3
Answers

Get all the ActionResult as JsonResult only in mvc

Dileep Singh

Dileep Singh

4y
561
1
So i have a scenario  where  i need to impliment like .. i have some controllers classes inside there are some "Action Method" ... and i want to allow only the JsonResult as a return type for all the action methods  present in the  all Controllers. but here i don't want to go on each action method in each controller and write  JsonResult as return type... we don't want to allow other types of ReturnType (only JsonResult should Allow):..How we can do that.. dose anyone have solution for this.. 
Answers (3)