StartPage Class

Provides methods and properties that are used to render start pages that use the Razor view engine.

Inheritance Hierarchy

System.Object
  System.Web.WebPages.WebPageExecutingBase
    System.Web.WebPages.WebPageRenderingBase
      System.Web.WebPages.StartPage
        System.Web.WebPages.Administration.PackageManager.pagestart
        System.Web.WebPages.Administration.pagestart

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

Syntax

'Declaration
Public MustInherit Class StartPage _
    Inherits WebPageRenderingBase
'Usage
Dim instance As StartPage
public abstract class StartPage : WebPageRenderingBase
public ref class StartPage abstract : public WebPageRenderingBase
[<AbstractClassAttribute>]
type StartPage =  
    class 
        inherit WebPageRenderingBase 
    end
public abstract class StartPage extends WebPageRenderingBase

The StartPage type exposes the following members.

Constructors

  Name Description
Protected method StartPage Initializes a new instance of the StartPage class.

Top

Properties

  Name Description
Public property App (Inherited from WebPageExecutingBase.)
Public property AppState (Inherited from WebPageExecutingBase.)
Public property Cache (Inherited from WebPageRenderingBase.)
Public property ChildPage Gets or sets the child page of the current start page.
Public property Context Gets or sets the context of the ChildPage page. (Overrides WebPageExecutingBase.Context.)
Public property Culture (Inherited from WebPageRenderingBase.)
Protected property DisplayMode (Inherited from WebPageRenderingBase.)
Public property IsAjax (Inherited from WebPageRenderingBase.)
Public property IsPost (Inherited from WebPageRenderingBase.)
Public property Layout Gets or sets the path of the layout page for the ChildPage page. (Overrides WebPageRenderingBase.Layout.)
Public property Page Gets property-like access to ChildPage page data that is shared between pages, layout pages, and partial pages. (Overrides WebPageRenderingBase.Page.)
Public property PageContext (Inherited from WebPageRenderingBase.)
Public property PageData Gets array-like access to ChildPage page data that is shared between pages, layout pages, and partial pages. (Overrides WebPageRenderingBase.PageData.)
Public property Profile (Inherited from WebPageRenderingBase.)
Public property Request (Inherited from WebPageRenderingBase.)
Public property Response (Inherited from WebPageRenderingBase.)
Public property Server (Inherited from WebPageRenderingBase.)
Public property Session (Inherited from WebPageRenderingBase.)
Public property TemplateInfo (Inherited from WebPageRenderingBase.)
Public property UICulture (Inherited from WebPageRenderingBase.)
Public property UrlData (Inherited from WebPageRenderingBase.)
Public property User (Inherited from WebPageRenderingBase.)
Public property VirtualPath (Inherited from WebPageExecutingBase.)
Public property VirtualPathFactory (Inherited from WebPageExecutingBase.)

Top

Methods

  Name Description
Protected method BeginContext(Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected method BeginContext(TextWriter, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected method BeginContext(String, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected method BeginContext(TextWriter, String, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected method EndContext(Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected method EndContext(TextWriter, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected method EndContext(String, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Protected method EndContext(TextWriter, String, Int32, Int32, Boolean) (Inherited from WebPageExecutingBase.)
Public method Equals (Inherited from Object.)
Public method Execute (Inherited from WebPageExecutingBase.)
Public method ExecutePageHierarchy Calls the methods that are used to execute the developer-written code in the _PageStart start page and in the ChildPage page. (Overrides WebPageRenderingBase.ExecutePageHierarchy().)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Protected method GetOutputWriter Returns the text writer instance that is used to render the page. (Overrides WebPageExecutingBase.GetOutputWriter().)
Public methodStatic member GetStartPage Returns the initialization page for the specified page.
Public method GetType (Inherited from Object.)
Public method Href (Inherited from WebPageExecutingBase.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method NormalizeLayoutPagePath (Inherited from WebPageExecutingBase.)
Public method NormalizePath (Inherited from WebPageExecutingBase.)
Public method RenderPage Renders the ChildPage page. (Overrides WebPageRenderingBase.RenderPage(String, Object[]).)
Public method RunPage Executes the developer-written code in the ChildPage page.
Public method ToString (Inherited from Object.)
Public method Write(Object) Writes the string representation of the specified object as an HTML-encoded string. (Overrides WebPageExecutingBase.Write(Object).)
Public method Write(HelperResult) Writes the string representation of the specified HelperResult object as an HTML-encoded string. (Overrides WebPageExecutingBase.Write(HelperResult).)
Public method WriteAttribute (Inherited from WebPageExecutingBase.)
Public method WriteAttributeTo(TextWriter, String, PositionTagged<String>, PositionTagged<String>, AttributeValue[]) (Inherited from WebPageExecutingBase.)
Protected method WriteAttributeTo(String, TextWriter, String, PositionTagged<String>, PositionTagged<String>, AttributeValue[]) (Inherited from WebPageExecutingBase.)
Public method WriteLiteral Writes the string representation of the specified object without HTML encoding. (Overrides WebPageExecutingBase.WriteLiteral(Object).)

Top

Remarks

A _PageStart start page (_PageStart.cshtml or _PageStart.vbhtml page) runs when a request is made to a page within a folder and before any code in an individual pages runs. A _PageStart page is useful for setting up a consistent layout for all the pages within a particular folder. For more information, see Adding Website Startup Code.

Thread Safety

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

See Also

Reference

System.Web.WebPages Namespace