ProfileManager.Enabled 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 a value indicating whether the user profile is enabled for the application.

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

public static bool Enabled { get; }

Property Value

Type: System.Boolean

true if the user profile is enabled; otherwise, false. The default is false.

The user profile is enabled for an application using the enabled attribute of the configuration element.

The following code example shows the element in the section of the Web.config file for an ASP.NET application where the user profile has been enabled.

<profile enabled="true" defaultProvider="SqlProvider">
  <providers>
    <add name="SqlProvider"
      type="System.Web.Profile.SqlProfileProvider"
      connectionStringName="SqlServices"
      applicationName="MyApplication" />
  </providers>
</profile>

.NET Framework
Available since 2.0
Return to top
Show: