RazorPage Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents properties and methods that are needed in order to render a view that uses Razor syntax.
public ref class RazorPage abstract : Microsoft::AspNetCore::Mvc::Razor::IRazorPage
public ref class RazorPage abstract : Microsoft::AspNetCore::Mvc::Razor::RazorPageBase
public abstract class RazorPage : Microsoft.AspNetCore.Mvc.Razor.IRazorPage
public abstract class RazorPage : Microsoft.AspNetCore.Mvc.Razor.RazorPageBase
type RazorPage = class
interface IRazorPage
type RazorPage = class
inherit RazorPageBase
Public MustInherit Class RazorPage
Implements IRazorPage
Public MustInherit Class RazorPage
Inherits RazorPageBase
- Inheritance
-
RazorPage
- Inheritance
- Derived
- Implements
Constructors
RazorPage() |
Properties
BodyContent |
Gets or sets the body content. |
BodyContent |
Gets or sets the body content. (Inherited from RazorPageBase) |
Context |
An HttpContext representing the current request execution. |
DiagnosticSource |
Gets or sets a DiagnosticSource() instance used to instrument the page execution. |
DiagnosticSource |
Gets or sets a DiagnosticSource instance used to instrument the page execution. (Inherited from RazorPageBase) |
HtmlEncoder |
Gets the HtmlEncoder to use when this RazorPage handles non-IHtmlContent C# expressions. |
HtmlEncoder |
Gets the HtmlEncoder to use when this RazorPage handles non-IHtmlContent C# expressions. (Inherited from RazorPageBase) |
IsLayoutBeingRendered |
Gets or sets a flag that determines if the layout of this page is being rendered. |
IsLayoutBeingRendered |
Gets or sets a flag that determines if the layout of this page is being rendered. (Inherited from RazorPageBase) |
Layout |
Gets or sets the path of a layout page. |
Layout |
Gets or sets the path of a layout page. (Inherited from RazorPageBase) |
Output |
Gets the TextWriter that the page is writing output to. |
Output |
Gets the TextWriter that the page is writing output to. (Inherited from RazorPageBase) |
Path |
Gets the application base relative path to the page. |
Path |
Gets the application base relative path to the page. (Inherited from RazorPageBase) |
PreviousSectionWriters |
Gets or sets the sections that can be rendered by this page. |
PreviousSectionWriters |
Gets or sets the sections that can be rendered by this page. (Inherited from RazorPageBase) |
SectionWriters |
Gets the sections that are defined by this page. |
SectionWriters |
Gets the sections that are defined by this page. (Inherited from RazorPageBase) |
TempData |
Gets the ITempDataDictionary from the ViewContext. |
TempData |
Gets the ITempDataDictionary from the ViewContext. (Inherited from RazorPageBase) |
User |
Gets the ClaimsPrincipal of the current logged in user. |
User |
Gets the ClaimsPrincipal of the current logged in user. (Inherited from RazorPageBase) |
ViewBag |
Gets the dynamic view data dictionary. |
ViewBag |
Gets the dynamic view data dictionary. (Inherited from RazorPageBase) |
ViewContext |
Gets or sets the view context of the rendering view. |
ViewContext |
Gets or sets the view context of the rendering view. (Inherited from RazorPageBase) |
Methods
AddHtmlAttributeValue(String, Int32, Object, Int32, Int32, Boolean) | |
AddHtmlAttributeValue(String, Int32, Object, Int32, Int32, Boolean) |
Add an html attribute value. (Inherited from RazorPageBase) |
BeginAddHtmlAttributeValues(TagHelperExecutionContext, String, Int32, HtmlAttributeValueStyle) | |
BeginAddHtmlAttributeValues(TagHelperExecutionContext, String, Int32, HtmlAttributeValueStyle) |
Begins adding html attribute values. (Inherited from RazorPageBase) |
BeginContext(Int32, Int32, Boolean) | System.Object.BeginContext(System.Int32,System.Int32,System.Boolean) |
BeginWriteAttribute(String, String, Int32, String, Int32, Int32) | |
BeginWriteAttribute(String, String, Int32, String, Int32, Int32) |
Begins writing out an attribute. (Inherited from RazorPageBase) |
BeginWriteAttributeTo(TextWriter, String, String, Int32, String, Int32, Int32) | |
BeginWriteTagHelperAttribute() |
Starts a new scope for writing ITagHelper attribute values. |
BeginWriteTagHelperAttribute() |
Starts a new scope for writing ITagHelper attribute values. (Inherited from RazorPageBase) |
CreateTagHelper<TTagHelper>() |
Creates and activates a ITagHelper. |
CreateTagHelper<TTagHelper>() |
Creates and activates a ITagHelper. (Inherited from RazorPageBase) |
DefineSection(String, Func<Object,Task>) |
Creates a named content section in the page that can be invoked in a Layout page using
|
DefineSection(String, RenderAsyncDelegate) |
Creates a named content section in the page that can be invoked in a Layout page using RenderSection(String) or RenderSectionAsync(String, Boolean). |
EndAddHtmlAttributeValues(TagHelperExecutionContext) | |
EndAddHtmlAttributeValues(TagHelperExecutionContext) |
Ends adding html attribute values. (Inherited from RazorPageBase) |
EndContext() | System.Object.EndContext |
EndTagHelperWritingScope() |
Ends the current writing scope that was started by calling StartTagHelperWritingScope(HtmlEncoder). |
EndTagHelperWritingScope() |
Ends the current writing scope that was started by calling StartTagHelperWritingScope(HtmlEncoder). (Inherited from RazorPageBase) |
EndWriteAttribute() | |
EndWriteAttribute() |
Ends writing an attribute. (Inherited from RazorPageBase) |
EndWriteAttributeTo(TextWriter) | |
EndWriteTagHelperAttribute() |
Ends the current writing scope that was started by calling BeginWriteTagHelperAttribute(). |
EndWriteTagHelperAttribute() |
Ends the current writing scope that was started by calling BeginWriteTagHelperAttribute(). (Inherited from RazorPageBase) |
EnsureRenderedBodyOrSections() |
Verifies that all sections defined in PreviousSectionWriters were rendered, or the body was rendered if no sections were defined. |
ExecuteAsync() |
Renders the page and writes the output to the Writer. |
ExecuteAsync() |
Renders the page and writes the output to the Writer. (Inherited from RazorPageBase) |
FlushAsync() |
Invokes FlushAsync() on Output and Stream.FlushAsync on the response stream, writing out any buffered content to the Body. |
FlushAsync() |
Invokes FlushAsync() on Output and Stream.FlushAsync on the response stream, writing out any buffered content to the Body. (Inherited from RazorPageBase) |
Href(String) | |
Href(String) |
Returns a href for the given content path. (Inherited from RazorPageBase) |
IgnoreBody() |
In a Razor layout page, ignores rendering the portion of a content page that is not within a named section. |
IgnoreSection(String) |
In layout pages, ignores rendering the content of the section named |
InvalidTagHelperIndexerAssignment(String, String, String) |
Format an error message about using an indexer when the tag helper property is |
InvalidTagHelperIndexerAssignment(String, String, String) |
Format an error message about using an indexer when the tag helper property is |
IsSectionDefined(String) |
Returns a value that indicates whether the specified section is defined in the content page. |
PopWriter() |
Return a text writer from the stack. (Inherited from RazorPageBase) |
PushWriter(TextWriter) |
Puts a text writer on the stack. (Inherited from RazorPageBase) |
RenderBody() |
In a Razor layout page, renders the portion of a content page that is not within a named section. |
RenderSection(String, Boolean) |
In layout pages, renders the content of the section named |
RenderSection(String) |
In layout pages, renders the content of the section named |
RenderSectionAsync(String, Boolean) |
In layout pages, asynchronously renders the content of the section named |
RenderSectionAsync(String) |
In layout pages, asynchronously renders the content of the section named |
SetAntiforgeryCookieAndHeader() |
Sets antiforgery cookie and X-Frame-Options header on the response. |
SetAntiforgeryCookieAndHeader() |
Sets antiforgery cookie and X-Frame-Options header on the response. (Inherited from RazorPageBase) |
StartTagHelperWritingScope(HtmlEncoder) |
Starts a new writing scope and optionally overrides HtmlEncoder within that scope. |
StartTagHelperWritingScope(HtmlEncoder) |
Starts a new writing scope and optionally overrides HtmlEncoder within that scope. (Inherited from RazorPageBase) |
Write(Object) |
Writes the specified |
Write(Object) |
Writes the specified |
Write(String) |
Writes the specified |
WriteAttributeValue(String, Int32, Object, Int32, Int32, Boolean) | |
WriteAttributeValue(String, Int32, Object, Int32, Int32, Boolean) |
Writes out an attribute value. (Inherited from RazorPageBase) |
WriteAttributeValueTo(TextWriter, String, Int32, Object, Int32, Int32, Boolean) | |
WriteLiteral(Object) |
Writes the specified |
WriteLiteral(Object) |
Writes the specified |
WriteLiteral(String) |
Writes the specified |
WriteLiteralTo(TextWriter, Object) |
Writes the specified |
WriteLiteralTo(TextWriter, String) |
Writes the specified |
WriteTo(TextWriter, HtmlEncoder, Object) |
Writes the specified |
WriteTo(TextWriter, Object) |
Writes the specified |
WriteTo(TextWriter, String) |
Writes the specified |