PagesSection.UserControlBaseType 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 user controls inherit by default.

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

<ConfigurationPropertyAttribute("userControlBaseType", DefaultValue := "System.Web.UI.UserControl")>
Public Property UserControlBaseType As String

Property Value

Type: System.String

A string that specifies a code-behind file that user controls inherit by default.

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

' Get the current UserControlBaseType property value.
Console.WriteLine( _
    "Current UserControlBaseType value: '{0}'", _
    pagesSection.UserControlBaseType)

' Set the UserControlBaseType property to
' "MyNameSpace.MyCustomControlBaseType".
pagesSection.UserControlBaseType = _
    "MyNameSpace.MyCustomControlBaseType"

.NET Framework
Available since 2.0
Return to top
Show: