ASP.NET MVC 3 - pass a ViewModel to a strongly typed Partial View

Posted on 2011-10-02
Last Modified: 2012-08-13
I'm a little new to MVC and I'm trying to implement a partial view.  I have this partial view set up as a strongly typed partial view having a custom ViewModel class that I have created for it specifically.  I understand that inside a regular view I can return a populated version of the ViewModel to the View in the controller.  But I don't understand how to pass the ViewModel into a partial view.  How does this take place?
Question by:JosephEricDavis
    1 Comment
    LVL 8

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now