In Razor, there is no difference between views and partial views, as in WebForms (.aspx vs .ascx). In Razor, all views are templates. These templates may have a layout:
@{ Layout = "~/Views/Shared/_Layout.cshtml"; }
In this case, they are representations. If the layout is not specified, they can be considered as partial views. The layout is usually defined in the file ~/Views/_ViewStart.cshtml .
This is said if from your action with the controller you return PartialView(); instead of return View(); this layout will not apply.
I would recommend you read the following blog post about Razor views and layouts.
Darin Dimitrov
source share