Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to retrive value from multiple table in mvc .
Posted
Comments
Richard MacCutchan 28-Nov-12 6:33am    
Then you need to either do it, or explain what your problem is. We cannot see your coding or read your mind.

There are two ways of doing it.

1. Do it through controller.
2. Create view model that contains object of multiple tables and use that view model wherever you need it.

hope it helps...

Sagar Solanki
 
Share this answer
 
Hai

1. You can create a View Model as mentioned in this reference Multiple Models in a View in ASP.NET MVC 4 / MVC 5[^]


2. You can use PartialView or PartialAction in your view to load the different model from the controller

you can also refer this link to view small examples on each http://stackoverflow.com/questions/5763631/multiple-models-in-a-single-view-c-mvc3[^]

Hope it helps
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900