RazorPageBase.DefineSection Method

Definition

Overloads

DefineSection(String, Func<Object,Task>)

Creates a named content section in the page that can be invoked in a Layout page using RenderSection or RenderSectionAsync

DefineSection(String, RenderAsyncDelegate)

Creates a named content section in the page that can be invoked in a Layout page using RenderSection or RenderSectionAsync

DefineSection(String, Func<Object,Task>)

Source:
RazorPageBase.cs
Source:
RazorPageBase.cs
Source:
RazorPageBase.cs

Creates a named content section in the page that can be invoked in a Layout page using RenderSection or RenderSectionAsync

protected:
 void DefineSection(System::String ^ name, Func<System::Object ^, System::Threading::Tasks::Task ^> ^ section);
protected void DefineSection (string name, Func<object,System.Threading.Tasks.Task> section);
protected void DefineSection (string name, Func<object?,System.Threading.Tasks.Task> section);
member this.DefineSection : string * Func<obj, System.Threading.Tasks.Task> -> unit
Protected Sub DefineSection (name As String, section As Func(Of Object, Task))

Parameters

name
String

The name of the section to create.

section
Func<Object,Task>

The delegate to execute when rendering the section.

Remarks

This is a temporary placeholder method to support ASP.NET Core 2.0.0 editor code generation.

Applies to

DefineSection(String, RenderAsyncDelegate)

Source:
RazorPageBase.cs
Source:
RazorPageBase.cs
Source:
RazorPageBase.cs

Creates a named content section in the page that can be invoked in a Layout page using RenderSection or RenderSectionAsync

public:
 virtual void DefineSection(System::String ^ name, Microsoft::AspNetCore::Mvc::Razor::RenderAsyncDelegate ^ section);
public virtual void DefineSection (string name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate section);
abstract member DefineSection : string * Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate -> unit
override this.DefineSection : string * Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate -> unit
Public Overridable Sub DefineSection (name As String, section As RenderAsyncDelegate)

Parameters

name
String

The name of the section to create.

section
RenderAsyncDelegate

The RenderAsyncDelegate to execute when rendering the section.

Applies to