PagesSection.PageBaseType Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value that specifies a code-behind class that .aspx pages inherit by default.

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

[ConfigurationPropertyAttribute("pageBaseType", DefaultValue = "System.Web.UI.Page")]
public string PageBaseType { get; set; }

Property Value

Type: System.String

A string that specifies a code-behind class that .aspx pages inherit by default.

The following code example shows how to use the PageBaseType property.

// Get the current PageBaseType property value.
Console.WriteLine(
    "Current PageBaseType value: '{0}'",
    pagesSection.PageBaseType);

// Set the PageBaseType property to
// "MyNameSpace.MyCustomPagelBaseType".
pagesSection.PageBaseType =
    "MyNameSpace.MyCustomPagelBaseType";

.NET Framework
Available since 2.0
Return to top
Show: