Partilhar via


RazorPage.DefineSection(String, RenderAsyncDelegate) Método

Definição

Cria uma seção de conteúdo nomeado na página que pode ser invocada em uma página layout usando RenderSection(String) ou RenderSectionAsync(String, Boolean).

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)

Parâmetros

name
String

O nome da seção a ser criada.

section
RenderAsyncDelegate

O RenderAsyncDelegate a ser executado ao renderizar a seção.

Aplica-se a