다음을 통해 공유


FormsAuthenticationUser.Name 속성

정의

로그온 사용자 이름을 가져오거나 설정합니다.

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Web.Configuration.LowerCaseStringConverter))]
[System.Configuration.ConfigurationProperty("name", DefaultValue="", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator]
public string Name { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Web.Configuration.LowerCaseStringConverter))>]
[<System.Configuration.ConfigurationProperty("name", DefaultValue="", IsKey=true, IsRequired=true)>]
[<System.Configuration.StringValidator>]
member this.Name : string with get, set
Public Property Name As String

속성 값

String

애플리케이션에 필요한 로그온 사용자 이름입니다.

특성

예제

다음 코드 예제에서는 Name 속성을 사용하는 방법을 보여 줍니다. 코드 예제에서는 참조는 FormsAuthenticationUser 클래스 항목의 섹션을 가져오는 방법을 알아봅니다.


// Using the Name property.

// Get current name.
string currentName = 
    formsAuthenticationUsers[0].Name;

// Set a new name.
formsAuthenticationUsers[0].Name = "userName";
' Using the Name property.
' Get current name.
  Dim currentName As String = _
  formsAuthenticationUsers(0).Name

' Set a new name.
formsAuthenticationUsers(0).Name = "userName"

적용 대상