2

I'm converting ASP.NET MVC projects to ASP.NET Core MVC 3.1 version.

I have mentioned the style paths in bundleconfig.json file. But how can we render these in ASP.Net Core cshtml files as we do in ASP.Net MVC like below:

@Styles.Render("~/Content/css")
@Styles.Render("~/Content/UserAdmin")

When I try to use the same in .Net Core, I'm getting this error:

The name 'Styles' does not exist in the current context

  • 1
    Does this answer your question? [Use "Scripts" and "Styles" in ASP.NET Core which originates from Microsoft.AspNet.Web.Optimization (.net-framework)](https://stackoverflow.com/questions/56806595/use-scripts-and-styles-in-asp-net-core-which-originates-from-microsoft-aspne) – Yong Shun Feb 19 '22 at 03:59

0 Answers0