Is it possible to use images and other file types such as css/js/etc. in a Razor Class library? I'm having an issue trying to get the images and css in the Razor Class Library to show up in a .Net Core 2.1 MVC application.
We used to use the File Provider and a C# class library but I feel like the Razor Class Library should be able to accomplish this now by simply adding a reference to the library in a project.
Blazor is a framework that leverages the Razor components to produce dynamic HTML. The biggest difference between Razor and Blazor is that Razor is a markup language with C#, while Blazor is the framework that lets you run C# code and use the Razor view engine in the browser.
You can add support for Pages to any ASP.NET Core MVC app by simply adding a Pages folder and adding Razor Pages files to this folder. Razor Pages use the folder structure as a convention for routing requests.
@page makes the file into an MVC action, which means that it handles requests directly, without going through a controller. @page must be the first Razor directive on a page. @page affects the behavior of other Razor constructs. Razor Pages file names have a .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With