1

I have a strongly typed partial view #1, and i have another partial view #2 that is strongly typed with same model. i have referenced partial view #2 inside partial view #1, now i need to pass the same model from partial view #1 onto #2 how can i do so?>

View#1
    @model Models.ContentModel.Model1
    @Html.Partial("../PartialViews/View#2", ???????)


View#2
    @model Models.ContentModel.Model1

1 Answer 1

1
@Html.Partial("<filename-withoutextension>", Model)

Model is the default variable name for strongly typed Views and Partial Views.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.