WebControlsSection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
섹션을 webControls 구성합니다. 이 클래스는 상속할 수 없습니다.
public ref class WebControlsSection sealed : System::Configuration::ConfigurationSection
public sealed class WebControlsSection : System.Configuration.ConfigurationSection
type WebControlsSection = class
inherit ConfigurationSection
Public NotInheritable Class WebControlsSection
Inherits ConfigurationSection
- 상속
예제
다음 코드 예제에서는 기존 웹 애플리케이션과 연결된 구성 파일에서 개체를 가져오는 WebControlsSection 방법을 보여 있습니다.
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the <webControls> section.
WebControlsSection webControlsSection =
(WebControlsSection)configuration.GetSection(
"system.web/webControls");
// Read the client script location.
string clientScriptLocation =
webControlsSection.ClientScriptsLocation;
string msg = String.Format(
"Client script location: {0}\n",
clientScriptLocation);
Console.Write(msg);
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the <webControls> section.
Dim webControlsSection _
As WebControlsSection = _
CType(configuration.GetSection( _
"system.web/webControls"), WebControlsSection)
' Read the client script location.
Dim clientScriptLocation As String = _
webControlsSection.ClientScriptsLocation
Dim msg As String = _
String.Format( _
"Client script location: {0}" + _
ControlChars.Lf, clientScriptLocation)
Console.Write(msg)
설명
클래스는 WebControlsSection 프로그래밍 방식으로 액세스 하 고 구성 파일의 섹션을 webControls 수정 하는 방법을 제공 합니다.
메모
ASP.NET 여러 페이지 및 애플리케이션에서 액세스할 수 있는 클라이언트 스크립트 파일에 대한 공유 위치를 제공합니다. 관련 섹션 속성인 WebControlsSection의 값이 AllowDefinition일 때, Everywhere는 구성 파일의 해당 섹션에서 정보를 읽고 쓸 수 있습니다.
생성자
| Name | Description |
|---|---|
| WebControlsSection() |
WebControlsSection새 인스턴스를 생성합니다. |