Share via


RazorPagesSection.PageBaseType Property

Gets or sets the name of the page base type class.

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

Syntax

'Declaration
<ConfigurationPropertyAttribute("pageBaseType", IsRequired := True)> _
Public Property PageBaseType As String 
    Get 
    Set
'Usage
Dim instance As RazorPagesSection 
Dim value As String 

value = instance.PageBaseType

instance.PageBaseType = value
[ConfigurationPropertyAttribute("pageBaseType", IsRequired = true)]
public string PageBaseType { get; set; }
[ConfigurationPropertyAttribute(L"pageBaseType", IsRequired = true)]
public:
property String^ PageBaseType {
    String^ get ();
    void set (String^ value);
}
[<ConfigurationPropertyAttribute("pageBaseType", IsRequired = true)>]
member PageBaseType : string with get, set
function get PageBaseType () : String 
function set PageBaseType (value : String)

Property Value

Type: System.String
The name of the page base type class.

Remarks

This property specifies the name of the base class that the current page class will inherit from when the Razor parser generates code for the page. For example, if a Web Pages page is named StoreFront.cshtml, the Razor parser will create a class for the StoreFront.cshtml Web page. The generated class will inherit from the class that is specified by the PageBaseType property.

By default, the default value for PageBaseType is System.Web.WebPages.WebPage.

If you use a custom page base type and if you want to use the default HTTP handler that processes Web Pages pages, your page base type must derive from WebPage.

See Also

Reference

RazorPagesSection Class

System.Web.WebPages.Razor.Configuration Namespace