語言

AcceptsAssetPathAttribute 類別

定義

宣告一個接受靜態資產路徑擴展的 HTML 元素與屬性組合。

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class AcceptsAssetPathAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type AcceptsAssetPathAttribute = class
    inherit Attribute
Public NotInheritable Class AcceptsAssetPathAttribute
Inherits Attribute
繼承
AcceptsAssetPathAttribute
屬性

範例

[AcceptsAssetPath("img", "src")]
public static class AssetPathAttributes
{
}

備註

Razor 編譯器會在名為 的公開類別中發現這些元 AssetPathAttributes資料。

建構函式

名稱 Description
AcceptsAssetPathAttribute(String, String)

初始化一個新的 實 AcceptsAssetPathAttribute例。

屬性

名稱 Description
AttributeName

取得 HTML 屬性名稱。

ElementName

取得 HTML 元素名稱。

適用於