A partial view is similar to a regular view, but it is intended to be included in the middle of one. The syntax and feature set are exactly the same. The concept is similar to that of user controls in ASP.NET Web Forms, and the idea is basically DRY (short for Don't Repeat Yourself). By wrapping common content in a partial view, we can reference it in different places.
There are three ways in which you can include a partial view in the middle of a view, both in a synchronous and an asynchronous manner. The first way involves the Partial and PartialAsync methods, as illustrated in the following code snippet:
@Html.Partial("LoginStatus")
@await Html.PartialAsync("LoginStatus")
You would use the asynchronous version if the view has any code that needs to run asynchronously.
Another way to include partial contents is throughRenderPartialandRenderPartialAsync, as illustrated in the following code snippet...