RazorPage.DefineSection(String, RenderAsyncDelegate) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用 或 RenderSectionAsync(String, Boolean) ,在頁面中建立可在版面配置頁面中 RenderSection(String) 叫用的具名內容區段。
public:
void DefineSection(System::String ^ name, Microsoft::AspNetCore::Mvc::Razor::RenderAsyncDelegate ^ section);
public:
override void DefineSection(System::String ^ name, Microsoft::AspNetCore::Mvc::Razor::RenderAsyncDelegate ^ section);
public void DefineSection (string name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate section);
public override void DefineSection (string name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate section);
member this.DefineSection : string * Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate -> unit
override this.DefineSection : string * Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate -> unit
Public Sub DefineSection (name As String, section As RenderAsyncDelegate)
Public Overrides Sub DefineSection (name As String, section As RenderAsyncDelegate)
參數
- name
- String
要建立的區段名稱。
- section
- RenderAsyncDelegate
轉 RenderAsyncDelegate 譯區段時要執行的 。