Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Linux MVC
Hi,
I want to retrive value from multiple table in mvc .
Posted 28-Nov-12 1:21am
Mithkr869
Comments
Richard MacCutchan at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  

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



Advertise | Privacy | Mobile
Web02 | 2.8.150326.1 | Last Updated 13 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100