asp.net mvc - MVC - Call multiple controllers for a single view -


I have a view to show students, courses, topics together, I have 3 different controllers for each I get a model I

I do not want to merge 3 different models in one model and then want to call a controller. Instead I need 3 different controllers and call 3 for these controllers. How to get it?

  Public Class ABV Controller: Controller {Public Activity Student Student} (See Return (RepositoryHeather.Gate Student List); } Public Action Course () {See RezultaryHeather Gate Course List ()); } Public Action Topic () {View Returns (RepositoryHelper GatesWise's List); }}   

- View

  (HTML.BeginForm ("GetData", "University", FormMethod.Post, new {id = "parameter"} )) {@: & Lt; Table & gt; @: & Lt; TR & gt; & Lt; TD & gt; @html Dropdown list ("student") @: & lt; / Tr & gt; & Lt; / Td> @: & Lt; TR & gt; & Lt; TD & gt; @html.drafficdollist ("course") @: & lt; / Tr & gt; & Lt; / Td> @: & Lt; TR & gt; & Lt; TD & gt; @html.doubaadualist ("subject") @: & lt; / Tr & gt; & Lt; / Td> @: & Lt; / Table & gt; @: & Lt; P & gt; & Lt; Input type = 'submit' value = 'submit & gt; & Lt; / P & gt; }    

You should wrap your model in your ViewModel class and make that view The view that MODEL must receive.

Comments