We are exploring Razor Class Library (RCL) functionalities in this section. RCL allows you to create reusable UI libraries.
Razor Class Library - Hello World
This is the simplest example to demonstrate the functionality of RCL. The library uses Razor Pages. Go to
src/WebApplication
folder and rundotnet watch run
to run the sample.Thanks to @AdrienTorris.
Razor Class Library - Include static files
This is similar to previous example except now you can including static files (javascript, images, css, etc) with your RCL. Go to
src/WebApplication
folder and rundotnet watch run
to run the sample.Thanks to @AdrienTorris.
Razor Class Library - using Controllers and Views
This sample demonstrates on how to use Controllers and Views in your Razor Class Library in contrast to previous examples that uses Razor Pages.
Thanks to @AdrienTorris.
dotnet6