共用方式為


AnchorTagHelper.Process(TagHelperContext, TagHelperOutput) 方法

定義

使用指定的 contextoutput 以同步方式執行 TagHelper

public:
 override void Process(Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContext ^ context, Microsoft::AspNetCore::Razor::TagHelpers::TagHelperOutput ^ output);
public override void Process (Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output);
override this.Process : Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext * Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput -> unit
Public Overrides Sub Process (context As TagHelperContext, output As TagHelperOutput)

參數

context
TagHelperContext

包含與目前 HTML 標籤相關聯的資訊。

output
TagHelperOutput

用來產生 HTML 標籤的具狀態 HTML 專案。

例外狀況

如果 href 提供屬性且 ActionFragmentControllerHost 、、 ProtocolRoute 為非, null 或使用者提供 asp-route-* 的屬性,則擲回 。 如果 Route 和 其中一個 或 兩者 ActionController 都不是 , null 也會擲回 。

備註

如果使用者提供 href 屬性,則不會執行任何動作。

適用於