다음을 통해 공유


ClientTarget.UserAgent 속성

정의

사용자 에이전트의 ID 이름을 가져옵니다.

public:
 property System::String ^ UserAgent { System::String ^ get(); };
[System.Configuration.ConfigurationProperty("userAgent", IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string UserAgent { get; }
[<System.Configuration.ConfigurationProperty("userAgent", IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.UserAgent : string
Public ReadOnly Property UserAgent As String

속성 값

사용자 에이전트의 ID 이름입니다.

특성

예제

다음 코드 예제에서는 기존 웹 애플리케이션의 UserAgent 구성 파일에서 가져오는 방법을 보여줍니다.


           // Get the first client target 
           // in the collection.
           clientTarget = clientTargets[0];

           // Get he user agent.
           userAgent = clientTarget.UserAgent;

           msg = String.Format(
                 "User Agent: {0}\n",
                 userAgent);
' Get the first client target 
' in the collection.
clientTarget = clientTargets(0)

' Get he user agent.
userAgent = clientTarget.UserAgent

msg = String.Format( _
"User Agent: {0}" + ControlChars.Lf, userAgent)

설명

속성은 UserAgentuserAgent 구성 파일의 섹션에 add 있는 clientTarget 요소의 특성을 참조합니다.

ASP.NET 구성은 기본적으로 다양한 Microsoft Internet Explorer 버전에 대한 페이지를 사용자 지정할 수 있습니다. 그 중에는 internet Explorer 4.0 이상에서 지원하는 클라이언트 HTML 및 ECMAScript를 보내도록 ASP.NET 지시하는 별칭과 downlevelinternet Explorer 4.0보다 이전 브라우저에서 지원하는 HTML 및 스크립트를 제한하도록 ASP.NET 지시하는 별칭uplevel이 있습니다.

적용 대상

추가 정보