This article only records the process of learning by yourself. If you are a Senior Programmer, please pass!
A small error was prompted when the Division view was first used.
Partial View call: <% = Html. Partial ("LossDetail", ViewData. Model) %>
You can also call it like this: <% Html. RenderPartial ("LossDetail", ViewData. Model); %> remember that there is a semicolon next to it.
Action error returned:
Return View ("segment View name ")
Return the branch View directly in the Action Return, so that the branch View is not displayed in the main View. It really makes me depressed, and I think my Return results are correct, why is it not displayed in the main view!
Return the correct Action:
Return View ("main View name ")
The reason is that I directly returned the branch view, which should be displayed in the main view. Remember that the branch view is called by the main view. In addition, the segment view can be separately displayed, but the corresponding Action of the segment view is required.
In this way, the effect I want is achieved. The Division view is useful in many ways.
From: column zhongshuling2009