Export (0) Print
Expand All

ProfilePropertySettings Constructor (String, Boolean, SerializationMode, String, String, String, Boolean, String)

Initializes a new instance of the ProfilePropertySettings class with the specified name and settings.

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

'Declaration
Public Sub New ( _
	name As String, _
	readOnly As Boolean, _
	serializeAs As SerializationMode, _
	providerName As String, _
	defaultValue As String, _
	profileType As String, _
	allowAnonymous As Boolean, _
	customProviderData As String _
)

Parameters

name
Type: System.String

A unique name for the ProfilePropertySettings object.

readOnly
Type: System.Boolean

true to indicate that the associated property in the dynamically generated ProfileCommon class should be read-only; otherwise, false.

serializeAs
Type: System.Web.Configuration.SerializationMode

One of the SerializationMode values.

providerName
Type: System.String

The name of a provider from the Providers property, or an empty string ("").

defaultValue
Type: System.String

A string containing the default value used for the named property in the generated page Profile class.

profileType
Type: System.String

A valid type reference or an empty string.

allowAnonymous
Type: System.Boolean

true to indicate associated property in the dynamically generated ProfileCommon class should support anonymous users; otherwise, false, to indicate that anonymous users cannot change the named property.

customProviderData
Type: System.String

A string containing provider-specific information used by the provider associated with the property.

At run time, the ASP.NET compilation system uses the information specified in the profile section of the configuration file to generate a class called ProfileCommon, which is derived from ProfileBase. The class allows you to access and modify the values for individual user profiles.

The ProfileCommon class definition is based on the properties defined in the properties subsection of the profile section of the configuration file. The parameter values that you specify when you create an instance of the ProfilePropertySettings class will be used to define an associated property in the ProfileCommon class.

For more information about profile properties, see ASP.NET Profile Properties Overview.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft