- Controller1 - Index() > return View1
- Controller2 - Index() > return View2
- Controller3 - Index() > return View3 ....
Controller1000 - Index()> return View1000
ControllerAAAA - GiveMeSomething(....) > return PartialView1
Objective: Add the result of PartialView1 on the View 1 to 1000.
Solutions: The controllers 1 to 1000 could inherit from a special class that holds the strongly typed object needed for the ControllerAAAA and then I could call, from the view, the PartialView1 and pass the object needed. I think this is the correct way to do it.
Other option: I also could have some ajax on the view to call the controller.
However I would like to know if I could simple call the Controller AAAA from the View1 to View 1000 and avoid the inherited class? Something like:
<%= CallController("GiveMeSomething", "ControllerAAAA", new Parameters(value1: "something", value2: 11 )%>
Is this possible? How?