Class RazorPageExtensions
Extension methods for Microsoft.AspNetCore.Mvc.Razor.RazorPage
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Web.Common.dll
Syntax
public static class RazorPageExtensions
Methods
View SourceRenderSection(RazorPage, String, HtmlString)
Renders a section with default content if the section isn't defined
Declaration
public static HtmlString RenderSection(this RazorPage webPage, string name, HtmlString defaultContents)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Razor.RazorPage | webPage | |
| System.String | name | |
| Microsoft.AspNetCore.Html.HtmlString | defaultContents |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.HtmlString |
RenderSection(RazorPage, String, String)
Renders a section with default content if the section isn't defined
Declaration
public static HtmlString RenderSection(this RazorPage webPage, string name, string defaultContents)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Razor.RazorPage | webPage | |
| System.String | name | |
| System.String | defaultContents |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.HtmlString |