다음을 통해 공유


IHttpSessionState.LCID 속성

정의

현재 세션의 LCID(로캘 식별자)를 가져오거나 설정합니다.

public:
 property int LCID { int get(); void set(int value); };
public int LCID { get; set; }
member this.LCID : int with get, set
Public Property LCID As Integer

속성 값

CultureInfo 현재 세션의 문화권을 지정하는 인스턴스입니다.

예제

다음 코드 예제에서는 LCID 현재 페이지의 로캘 식별자를 가져와서 설정하는 인터페이스의 IHttpSessionState 속성을 구현합니다.

//
// Session.LCID exists only to support legacy ASP compatibility. ASP.NET developers should use
// Page.LCID instead.
//
public int LCID
{
  get { return Thread.CurrentThread.CurrentCulture.LCID; }
  set { Thread.CurrentThread.CurrentCulture = CultureInfo.ReadOnly(new CultureInfo(value)); }
}
'
    ' Session.LCID exists only to support legacy ASP compatibility. ASP.NET developers should use
' Page.LCID instead.
'
Public Property LCID As Integer Implements IHttpSessionState.LCID
  Get
    Return Thread.CurrentThread.CurrentCulture.LCID
  End Get
  Set
    Thread.CurrentThread.CurrentCulture = CultureInfo.ReadOnly(new CultureInfo(value))
  End Set
End Property

설명

LCID 속성은 이전 버전의 ASP와의 호환성을 위해 제공됩니다. ASP 페이지와의 이전 버전과의 호환성을 유지할 필요가 없는 경우 대신 속성을 사용합니다 LCID .

ASP.NET 로캘 식별자를 세션 상태에 저장하지 않습니다. 이 속성은 LCID 식별자를 가져와서 설정하기 위해 호출 LCID 합니다.

적용 대상

추가 정보