ProfilePropertySettings.DefaultValue 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
동적으로 생성된 ProfileCommon 클래스의 연결된 속성에 사용되는 기본값을 가져오거나 설정합니다.
public:
property System::String ^ DefaultValue { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("defaultValue", DefaultValue="")]
public string DefaultValue { get; set; }
[<System.Configuration.ConfigurationProperty("defaultValue", DefaultValue="")>]
member this.DefaultValue : string with get, set
Public Property DefaultValue As String
속성 값
동적으로 생성된 ProfileCommon 클래스의 연결된 속성에 사용되는 기본값을 포함하는 문자열입니다. 기본값은 빈 문자열("")입니다.
- 특성
예제
다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 DefaultValue . 이 코드 예제는 클래스에 제공된 더 큰 예제의 ProfileSection 일부입니다.
// Get the current DefaultValue property value.
Console.WriteLine(
"Current DefaultValue value: '{0}'", profilePropertySettings.DefaultValue);
// Set the DefaultValue property to "March 16, 2004".
profilePropertySettings.DefaultValue = "March 16, 2004";
' Get the current DefaultValue property value.
Console.WriteLine( _
"Current DefaultValue value: '{0}'", profilePropertySettings.DefaultValue)
' Set the DefaultValue property to "March 16, 2004".
profilePropertySettings.DefaultValue = "March 16, 2004"
설명
런타임에 ASP.NET 컴파일 시스템은 구성 파일의 섹션에 profile 지정된 정보를 사용하여 파생되는 ProfileBase클래스를 ProfileCommon생성합니다. 클래스를 사용하면 개별 사용자 프로필에 대한 값에 액세스하고 수정할 수 있습니다.
ProfileCommon 클래스 정의는 구성 파일 섹션의 하위 섹션에 propertiesprofile 정의된 속성을 기반으로 합니다. 클래스 인스턴스 ProfilePropertySettings 에 대해 지정하는 속성 값은 클래스에서 ProfileCommon 연결된 속성을 정의하는 데 사용됩니다.
기본값은 개별 사용자 프로필에 속성에 대한 값이 ProfileCommon 없는 경우 연결된 클래스 속성의 초기 값으로 사용됩니다. 속성은 DefaultValue 문자열 값, XML로 인코딩된 값(속성에 대한 serialization 모드는 XML serialization) 또는 base-64로 인코딩된 이진 문자열일 수 있습니다(속성의 serialization 모드가 이진 serialization인 경우).