What is the best way to insert re-usable code into a cshtml razor file. I need to pass in data from the outer loop into the user control. I took a picture of what I'm trying to do hoping that will make it very clear.
Use
@Html.RenderPartial(<virtual path to your partial view>, session);
where partial view is typed view with the model of session
type.