ProfileSection::Inherits Property
Gets or sets a type reference for a custom type derived from ProfileBase.
Assembly: System.Web (in System.Web.dll)
[ConfigurationPropertyAttribute(L"inherits", DefaultValue = L"")] public: property String^ Inherits { String^ get (); void set (String^ value); }
Property Value
Type: System::StringA valid type reference, or an empty string (""). The default is an empty string.
At run time, the ASP.NET compilation system uses the information specified in the profile section of the configuration to generate a class called ProfileCommon, which is derived from ProfileBase. To customize the information this class provides, you can set the Inherits property to the name of a type you create that derives from ProfileBase, and the compilation system will use this custom type as the base class for ProfileCommon.
Note |
|---|
If you provide a type reference in the Inherits property, you can define properties in your custom types that are not defined with a property element. |
For more information about the profile features added to ASP.NET 2.0, see ASP.NET Profile Properties Overview.
The following code example shows how to use the Inherits property. This code example is part of a larger example provided for the ProfileSection class.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note