Table of Contents

Class DynamicCode

Namespace
ToSic.Sxc.Dnn
Assembly
ToSic.Sxc.Dnn.Core.dll

This is a base class for custom code files with context.
If you create a class file for dynamic use and inherit from this, then the compiler will automatically add objects like Link, Dnn, etc. The class then also has AsDynamic(...) and AsList(...) commands like a normal razor page.

[PublicApi]
public abstract class DynamicCode : DynamicCode, ICanDebug, IDnnDynamicCode, IHasLog, IHasDnn
Inheritance
DynamicCode
DynamicCode
Implements

Properties

Dnn

The DNN context. Has various objects to access the Dnn Page, etc.

public IDnnContext Dnn { get; }

Property Value

IDnnContext