I'm building a website using the new asp.net core 2.0 with Razor pages. I had trouble insert html blocks for reuse (for example a menu). I asked here and the answer I got was to use @{Html.RenderPartial
Then, when I used it I still got an error. To solve the error I had to remove the @page from the .cshtml file that I wanted to insert to the page. The reason, as I got answer here is because @{Html.RenderPartial is part of MVC, therefore it's a partial view and can't use the @page at the top of the page.
But, here's my confusion: in the documentation of Microsoft, they say very clear that now with the new asp.net core 2.0 you should put @page in every page (.cshtml file) you create.
So, now the question is: what's the proper way to insert html blocks for reuse in the new asp.net core 2.0, and if there's a proper way?
Because it seems that you either use the MVC, and have to remove @page. But Microsoft says you have to put the @page. So I'm confusing.
This is what they write: ". @page must be the first Razor directive on a page. "
from this page: https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages/index?tabs=visual-studio
Also, the new ASP.NET core 2.0 is MVVM. So why do I have to use MVC in order to reuse html blocks?
Thanks