Where is RenderPartial () included in ASP.Net 5 MVC 6?

ASP.Net 5 MVC 6 has Html.RenderPartialAsync , but not Html.RenderPartial . While doing some digging, I see that there is a new thing called View Components , which seems to be a more powerful version of partial views, but focused on dynamic things. Did MVC 6 RenderPartial or did I just not find any documentation on it? I want to use it to include a static navigation menu file in the main layout.

+5
source share
1 answer

RenderPartial really does not exist in "Microsoft.AspNet.Mvc": "6.0.0-rc1-final" . However, it has already been implemented and is likely to be included in 6.0.0-rc2 . https://github.com/aspnet/Mvc/issues/3705 .

The workaround is to use RenderPartialAsync , it works great.

+4
source

Source: https://habr.com/ru/post/1240023/


All Articles