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 Web アプリケーションに関連付けられている構成ファイルから オブジェクトを取得する方法を示しています。
// 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
セクションにプログラムからアクセスして変更できます。
Note
ASP.NET は、クライアント スクリプト ファイルの共有場所を提供します。クライアント スクリプト ファイルは、複数のページから、またアプリケーション間でアクセスできます。 はWebControlsSection、値Everywhereが である section プロパティAllowDefinitionに従って、構成ファイルの関連セクションとの間で情報の読み取りと書き込みを行うことができます。
コンストラクター
WebControlsSection() |
WebControlsSection の新しいインスタンスを作成します。 |
プロパティ
メソッド
適用対象
こちらもご覧ください
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示