Export (0) Print
Expand All

WebPage Class

Represents an ASP.NET Razor page.

Namespace:  System.Web.WebPages
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

public abstract class WebPage : WebPageBase

The WebPage type exposes the following members.

  NameDescription
Protected methodWebPageCalled from a derived class to create a new instance that is based on the WebPage class.
Top

  NameDescription
Public propertyApp (Inherited from WebPageExecutingBase.)
Public propertyAppState (Inherited from WebPageExecutingBase.)
Public propertyCache (Inherited from WebPageRenderingBase.)
Public propertyContextGets or sets the HttpContextBase object that is associated with a page. (Overrides WebPageExecutingBase.Context.)
Public propertyCulture (Inherited from WebPageRenderingBase.)
Protected propertyDisplayMode (Inherited from WebPageRenderingBase.)
Public propertyHtmlGets the HtmlHelper object that is associated with a page.
Public propertyIsAjax (Inherited from WebPageRenderingBase.)
Public propertyIsPost (Inherited from WebPageRenderingBase.)
Public propertyLayoutGets or sets the path of a layout page. (Inherited from WebPageBase.)
Public propertyModelGets the model that is associated with a page.
Public propertyModelStateGets the state of the model that is associated with a page.
Public propertyOutputGets the current TextWriter object for the page. (Inherited from WebPageBase.)
Public propertyOutputStackGets the stack of TextWriter objects for the current page context. (Inherited from WebPageBase.)
Public propertyPageProvides property-like access to page data that is shared between pages, layout pages, and partial pages. (Inherited from WebPageBase.)
Public propertyPageContext (Inherited from WebPageRenderingBase.)
Public propertyPageDataProvides array-like access to page data that is shared between pages, layout pages, and partial pages. (Inherited from WebPageBase.)
Public propertyProfile (Inherited from WebPageRenderingBase.)
Public propertyRequest (Inherited from WebPageRenderingBase.)
Public propertyResponse (Inherited from WebPageRenderingBase.)
Public propertyServer (Inherited from WebPageRenderingBase.)
Public propertySession (Inherited from WebPageRenderingBase.)
Public propertyTemplateInfo (Inherited from WebPageRenderingBase.)
Public propertyUICulture (Inherited from WebPageRenderingBase.)
Public propertyUrlData (Inherited from WebPageRenderingBase.)
Public propertyUser (Inherited from WebPageRenderingBase.)
Public propertyValidationGets the validation helper for the current page context.
Public propertyVirtualPath (Inherited from WebPageExecutingBase.)
Public propertyVirtualPathFactory (Inherited from WebPageExecutingBase.)
Top

  NameDescription
Protected methodBeginContext(Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected methodBeginContext(TextWriter, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected methodBeginContext(String, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected methodBeginContext(TextWriter, String, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected methodConfigurePageWhen overridden in a derived class, configures the current web page based on the configuration of the parent web page. (Inherited from WebPageBase.)
Protected methodCreatePageFromVirtualPathAttempts to create a WebPageBase instance from a virtualPath and wraps complex compiler exceptions with simpler messages (Inherited from WebPageBase.)
Public methodDefineSectionCalled by content pages to create named content sections. (Inherited from WebPageBase.)
Protected methodEndContext(Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected methodEndContext(TextWriter, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected methodEndContext(String, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected methodEndContext(TextWriter, String, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Public methodEquals (Inherited from Object.)
Public methodExecute (Inherited from WebPageExecutingBase.)
Public methodExecutePageHierarchy()Executes the code in a set of dependent pages. (Overrides WebPageBase.ExecutePageHierarchy().)
Public methodExecutePageHierarchy(WebPageContext, TextWriter)Executes the code in a set of dependent web pages by using the specified parameters. (Inherited from WebPageBase.)
Public methodExecutePageHierarchy(WebPageContext, TextWriter, WebPageRenderingBase)Executes the code in a set of dependent web pages by using the specified context, writer, and start page. (Inherited from WebPageBase.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Protected methodGetOutputWriterReturns the text writer instance that is used to render the page. (Inherited from WebPageBase.)
Public methodGetType (Inherited from Object.)
Public methodHref (Inherited from WebPageExecutingBase.)
Protected methodInitializePageInitializes an object that inherits from the WebPage class. (Overrides WebPageBase.InitializePage().)
Public methodIsSectionDefinedReturns a value that indicates whether the specified section is defined in the page. (Inherited from WebPageBase.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodNormalizeLayoutPagePath (Inherited from WebPageExecutingBase.)
Public methodNormalizePath (Inherited from WebPageExecutingBase.)
Public methodPopContextReturns and removes the context from the top of the OutputStack instance. (Inherited from WebPageBase.)
Public methodPushContextInserts the specified context at the top of the OutputStack instance. (Inherited from WebPageBase.)
Public methodStatic memberRegisterPageExecutorAdds a class to a list of classes that handle page execution and that implement custom features for pages.
Public methodRenderBodyIn layout pages, renders the portion of a content page that is not within a named section. (Inherited from WebPageBase.)
Public methodRenderPageRenders a content page. (Overrides WebPageBase.RenderPage(String, Object[]).)
Public methodRenderSection(String)In layout pages, renders the content of a named section. (Inherited from WebPageBase.)
Public methodRenderSection(String, Boolean)In layout pages, renders the content of a named section and specifies whether the section is required. (Inherited from WebPageBase.)
Public methodToString (Inherited from Object.)
Public methodWrite(Object)Writes the specified object as an HTML-encoded string. (Inherited from WebPageBase.)
Public methodWrite(HelperResult)Writes the specified HelperResult object as an HTML-encoded string. (Inherited from WebPageBase.)
Public methodWriteAttribute (Inherited from WebPageExecutingBase.)
Public methodWriteAttributeTo(TextWriter, String, PositionTagged<String>, PositionTagged<String>, AttributeValue[]) (Inherited from WebPageExecutingBase.)
Protected methodWriteAttributeTo(String, TextWriter, String, PositionTagged<String>, PositionTagged<String>, AttributeValue[]) (Inherited from WebPageExecutingBase.)
Public methodWriteLiteralWrites the specified object without HTML-encoding it first. (Inherited from WebPageBase.)
Top

The WebPage class is associated with source code files that have a .cshtml extension (for pages that use C#) or a .vbhtml extension (for pages that use Visual Basic). At run time, a web server compiles these files as WebPage objects and caches them in memory.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2015 Microsoft