TagHelperOutput.GetChildContentAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GetChildContentAsync() |
以非同步方式執行子系,並傳回其轉譯的內容。 |
GetChildContentAsync(Boolean) |
以非同步方式執行子系,並傳回其轉譯的內容。 |
GetChildContentAsync(HtmlEncoder) |
使用範圍中指定的 |
GetChildContentAsync(Boolean, HtmlEncoder) |
使用範圍中指定的 |
GetChildContentAsync()
以非同步方式執行子系,並傳回其轉譯的內容。
public:
System::Threading::Tasks::Task<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContent ^> ^ GetChildContentAsync();
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent> GetChildContentAsync ();
member this.GetChildContentAsync : unit -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent>
Public Function GetChildContentAsync () As Task(Of TagHelperContent)
傳回
Task完成時傳回子系所呈現內容的 。
備註
此方法已備忘。 多個呼叫不會讓子系使用頁面的原始 HtmlEncoder 重新執行。
適用於
GetChildContentAsync(Boolean)
以非同步方式執行子系,並傳回其轉譯的內容。
public:
System::Threading::Tasks::Task<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContent ^> ^ GetChildContentAsync(bool useCachedResult);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent> GetChildContentAsync (bool useCachedResult);
member this.GetChildContentAsync : bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent>
Public Function GetChildContentAsync (useCachedResult As Boolean) As Task(Of TagHelperContent)
參數
- useCachedResult
- Boolean
如果 true
為 ,則多個呼叫不會讓子系使用頁面的原始 HtmlEncoder 重新執行;傳回快取的內容。
傳回
Task完成時傳回子系所呈現內容的 。
適用於
GetChildContentAsync(HtmlEncoder)
使用範圍中指定的 encoder
以非同步方式執行子系,並傳回其轉譯的內容。
public:
System::Threading::Tasks::Task<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContent ^> ^ GetChildContentAsync(System::Text::Encodings::Web::HtmlEncoder ^ encoder);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent> GetChildContentAsync (System.Text.Encodings.Web.HtmlEncoder encoder);
member this.GetChildContentAsync : System.Text.Encodings.Web.HtmlEncoder -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent>
Public Function GetChildContentAsync (encoder As HtmlEncoder) As Task(Of TagHelperContent)
參數
- encoder
- HtmlEncoder
當 HtmlEncoder 頁面處理非 IHtmlContent C# 運算式時要使用的 。
如果 null
為 ,則會使用頁面的目前 HtmlEncoder 來執行子系。
傳回
Task完成時傳回子系所呈現內容的 。
備註
此方法已備忘。 具有相同實例的 HtmlEncoder 多個呼叫不會讓子系在範圍內使用該編碼器重新執行。
適用於
GetChildContentAsync(Boolean, HtmlEncoder)
使用範圍中指定的 encoder
以非同步方式執行子系,並傳回其轉譯的內容。
public:
System::Threading::Tasks::Task<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContent ^> ^ GetChildContentAsync(bool useCachedResult, System::Text::Encodings::Web::HtmlEncoder ^ encoder);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent> GetChildContentAsync (bool useCachedResult, System.Text.Encodings.Web.HtmlEncoder encoder);
member this.GetChildContentAsync : bool * System.Text.Encodings.Web.HtmlEncoder -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent>
Public Function GetChildContentAsync (useCachedResult As Boolean, encoder As HtmlEncoder) As Task(Of TagHelperContent)
參數
- useCachedResult
- Boolean
如果 true
為 ,則具有相同的 HtmlEncoder 多個呼叫不會讓子系重新執行;傳回快取的內容。
- encoder
- HtmlEncoder
當 HtmlEncoder 頁面處理非 IHtmlContent C# 運算式時要使用的 。
如果 null
為 ,則會使用頁面的目前 HtmlEncoder 來執行子系。
傳回
Task完成時傳回子系所呈現內容的 。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應