Language

AssetPathAttribute Class

Definition

Indicates that a component parameter accepts a static asset path that the Razor compiler can expand.

[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class AssetPathAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type AssetPathAttribute = class
    inherit Attribute
Public NotInheritable Class AssetPathAttribute
Inherits Attribute
Inheritance
AssetPathAttribute
Attributes

Examples

[Parameter]
[AssetPath]
public string? Source { get; set; }

Remarks

This attribute is valid only on properties that are also marked with ParameterAttribute.

Constructors

Name Description
AssetPathAttribute()

Applies to