View Source
Class UmbracoViewPage<TModel>
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.Razor.RazorPageBase
Microsoft.AspNetCore.Mvc.Razor.RazorPage
Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel>
Assembly: Umbraco.Web.Common.dll
Syntax
public abstract class UmbracoViewPage<TModel> : RazorPage<TModel>, IRazorPage
Type Parameters
Properties
View Source
Umbraco
Declaration
public UmbracoHelper Umbraco { get; }
Property Value
View Source
UmbracoContext
Declaration
protected IUmbracoContext? UmbracoContext { get; }
Property Value
Type |
Description |
System.Nullable<IUmbracoContext> |
|
View Source
ViewContext
Declaration
public override ViewContext ViewContext { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.ViewContext |
|
Methods
View Source
BindViewData(ContentModelBinder, ViewDataDictionary)
Dynamically binds the incoming Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary to the required
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1
Declaration
protected ViewDataDictionary BindViewData(ContentModelBinder contentModelBinder, ViewDataDictionary viewData)
Parameters
Type |
Name |
Description |
ContentModelBinder |
contentModelBinder |
|
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary |
viewData |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary |
|
View Source
RenderSection(String, HtmlString)
Renders a section with default content if the section isn't defined
Declaration
public HtmlString RenderSection(string name, HtmlString defaultContents)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Microsoft.AspNetCore.Html.HtmlString |
defaultContents |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
View Source
RenderSection(String, String)
Renders a section with default content if the section isn't defined
Declaration
public HtmlString RenderSection(string name, string defaultContents)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
defaultContents |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
View Source
Write(Object)
Declaration
public override void Write(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
View Source
WriteUmbracoContent(TagHelperOutput)
Declaration
public void WriteUmbracoContent(TagHelperOutput tagHelperOutput)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput |
tagHelperOutput |
|