The base class for Razor-Components in 2sxc 10+
Provides context infos like the Dnn object, helpers like Edit and much more.
To use this, create
cshtml files like
_person-list.cshtml in your app-folder.
By default, they will be typed the old way - which continues to work for compatibility.
We recommend to use this from now on. To do it, your code file must begin with an
@inherits statement, like this:
@inherits ToSic.Sxc.Dnn.RazorComponent <h1>hello from RazorComponent</h1>
[PublicApi_Stable_ForUseInYourCode] public abstract class RazorComponent : Razor12, ITemplateFile, ICoupledDynamicCode, IHasDynamicCodeRoot, IRazorComponent, IDnnDynamicCode, IDnnDynamicCodeAdditions, IRazor12, IDynamicCode, ICreateInstance, ICompatibilityLevel, IHasLog