Click here to Skip to main content
13,097,012 members (83,772 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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<person.persondata>

how can we display second partial view in main page ?
Posted 17-May-12 20:03pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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.
member60 18-May-12 6:46am
My 5!
VJ Reddy 18-May-12 8:33am
My 5!
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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 |
Web02 | 2.8.170813.1 | Last Updated 18 May 2012
Copyright © CodeProject, 1999-2017
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