ClientTargetSection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
clientTarget
섹션을 구성합니다. 이 클래스는 상속될 수 없습니다.
public ref class ClientTargetSection sealed : System::Configuration::ConfigurationSection
public sealed class ClientTargetSection : System.Configuration.ConfigurationSection
type ClientTargetSection = class
inherit ConfigurationSection
Public NotInheritable Class ClientTargetSection
Inherits ConfigurationSection
- 상속
예제
이 섹션에서는 두 코드 예제를 제공합니다. 첫 번째 선언적으로 표시 합니다 ClientTargetSection 클래스 및 선언적으로 일부의 속성에 대 한 값을 지정 하는 방법도 보여 줍니다는 ClientTarget 클래스입니다. 두 번째 가져오는 방법을 보여 줍니다는 ClientTargetCollection 구성 파일에서 개체입니다. 이 개체를 사용 하 여 액세스를 ClientTarget 개체를 포함 합니다.
다음 코드 예제에 선언적으로 일부의 속성에 대 한 값을 지정 하는 방법을 보여 줍니다는 ClientTarget 클래스입니다.
<clientTarget>
<add alias=
"uplevel" userAgent="Mozilla/5.0 (compatible;MSIE 6.0;Windows NT 5.1)"/>
<add alias="downlevel" userAgent="Generic Downlevel"/>
</clientTarget>
다음 코드 예제에서는 가져오는 방법을 보여 줍니다는 ClientTargetCollection 구성 파일에서 개체
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the <clientTarget> section.
ClientTargetSection clientTargetSection =
(ClientTargetSection)configuration.GetSection(
"system.web/clientTarget");
// Get the client target collection.
ClientTargetCollection clientTargets =
clientTargetSection.ClientTargets;
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the <clientTarget> section.
Dim clientTargetSection _
As ClientTargetSection = _
CType(configuration.GetSection( _
"system.web/clientTarget"), _
ClientTargetSection)
' Get the client target collection.
Dim clientTargets _
As ClientTargetCollection = _
clientTargetSection.ClientTargets
설명
합니다 ClientTargetSection 클래스는 프로그래밍 방식으로 액세스 하 고 수정 하는 방법을 제공 합니다 clientTarget
구성 파일의 섹션입니다. 포함 된 그룹에 속하기 합니다 ClientTargetCollection 클래스 및 ClientTarget 클래스입니다.
합니다 ClientTargetSection 클래스를 포함 ClientTarget 별칭 및 asp.net 서버 컨트롤 콘텐츠를 렌더링 해야 하는 연결 된 대상 사용자 에이전트의 쌍을 정의 하는 개체입니다.
생성자
ClientTargetSection() |
ClientTargetSection 클래스의 새 인스턴스를 초기화합니다. |