View Source
Class UmbracoViewPage<TModel>
Represents the properties and methods that are needed in order to render an Umbraco view.
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public abstract class UmbracoViewPage<TModel> : WebViewPage<TModel>
Type Parameters
Constructors
View Source
UmbracoViewPage()
Declaration
protected UmbracoViewPage()
View Source
UmbracoViewPage(ServiceContext, AppCaches)
Declaration
protected UmbracoViewPage(ServiceContext services, AppCaches appCaches)
Parameters
Properties
View Source
AppCaches
Gets or sets the application cache.
Declaration
public AppCaches AppCaches { get; set; }
Property Value
View Source
Members
Gets the membership helper.
Declaration
public MembershipHelper Members { get; }
Property Value
View Source
Services
Gets or sets the database context.
Declaration
public ServiceContext Services { get; set; }
Property Value
View Source
Umbraco
Declaration
public UmbracoHelper Umbraco { get; }
Property Value
View Source
UmbracoContext
Gets the Umbraco context.
Declaration
public UmbracoContext UmbracoContext { get; }
Property Value
Methods
View Source
InitializePage()
Ensure that the current view context is added to the route data tokens so we can extract it if we like
Declaration
protected override void InitializePage()
View Source
RenderSection(String, HelperResult)
Declaration
public HelperResult RenderSection(string name, HelperResult defaultContents)
Parameters
Type |
Name |
Description |
System.String |
name |
|
HelperResult |
defaultContents |
|
Returns
Type |
Description |
HelperResult |
|
View Source
RenderSection(String, Func<Object, HelperResult>)
Declaration
public HelperResult RenderSection(string name, Func<dynamic, HelperResult> defaultContents)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Func<System.Object, HelperResult> |
defaultContents |
|
Returns
Type |
Description |
HelperResult |
|
View Source
RenderSection(String, String)
Declaration
public HelperResult RenderSection(string name, string defaultContents)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
defaultContents |
|
Returns
Type |
Description |
HelperResult |
|
View Source
RenderSection(String, IHtmlString)
Declaration
public HelperResult RenderSection(string name, IHtmlString defaultContents)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Web.IHtmlString |
defaultContents |
|
Returns
Type |
Description |
HelperResult |
|
View Source
SetViewData(ViewDataDictionary)
Declaration
protected override void SetViewData(ViewDataDictionary viewData)
Parameters
Type |
Name |
Description |
ViewDataDictionary |
viewData |
|
View Source
WriteLiteral(Object)
This will detect the end /body tag and insert the preview badge if in preview mode
Declaration
public override void WriteLiteral(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|