Click here to Skip to main content
12,507,862 members (52,374 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: MVC3 ASP.NET4
actuaaly i got a problem
how can i show two view one main view and second partial view
main view in like
@model Person.Persondata


and second partial view is
@model ienurable
Posted 17-May-12 20:03pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hi,

You can pass a different model to your partial view.

Within your main page, add the following:

<% Html.RenderPartial("ViewName", viewModelObject); %>

In your main page you'll need access to the model for the partial view. Just pass it in when you render the partial view.
  Permalink  
v3
Comments
member60 18-May-12 6:46am
   
My 5!
VJ Reddy 18-May-12 8:33am
   
My 5!
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
VJ Reddy 18-May-12 8:34am
   
Good references. 5!

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 18 May 2012
Copyright © CodeProject, 1999-2016
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