Dear All,
I am currently using devexpress in my MVC razor application. So please my Question below:
Que: How to return multiple partial view from single controller action.
I have 2 Devexpress combobox , which will be bind as per another the third combobox selected.
Regards,
Jagatpal Singh


Kanniyappan Krish111 reputationPosted Nov 4, 2016, 4:37 AM EDT
You can only return one value from a function so you can't return multiple partials from one action method.
If you are trying to return two models to one view, create a view model that contains both of the models that you want to send, and make your view's model the new ViewModel. E.g.
Your view model would look like:
Then your controller action would be:
And finally your view would be:
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Nov 4, 2016, 10:25 AM EDT