Link to home
Start Free TrialLog in
Avatar of rawilken
rawilkenFlag for United States of America

asked on

RenderPartial on Controller

I have a view in my project that will display the contents of a controller. I want to take that controller and use it in another view to display the same contents albeit set for a different variable (the controllers context is determined on the value of a variable called pairingID). I am using knockout to display all the data. The error I get is that the view cannot access a nonstatic property in a static context. It must be a nonstatic property to work in the main view where it is rendered, so changing that is out of the question. How can I change or set the context of the view/render so it will display the control.

    <!-- ko with: pairingActivity -->
    Html.RenderPartial("Components/PairingActivity", CRC.TradeBreaks.MVC4.Models.Windows.PairingActivityWindow.PairingActivity);
    <!-- /ko -->
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial