PagesSectionとは? わかりやすく解説

PagesSection クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

構成ファイルの pages 要素 (ASP.NET 設定スキーマ) セクションにプログラムからアクセスできるようにします。このクラスは継承できません。

名前空間: System.Web.Configuration
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public NotInheritable Class
 PagesSection
    Inherits ConfigurationSection
public sealed class PagesSection : ConfigurationSection
public ref class PagesSection sealed : public
 ConfigurationSection
public final class PagesSection extends ConfigurationSection
public final class PagesSection extends
 ConfigurationSection
解説解説
使用例使用例

この例では、pages セクションの複数の属性に対して、宣言によって値を指定する方法を示しています。これらの属性には、PagesSection クラスのメンバとしてもアクセスできます。

次の構成ファイルの例では、pages 要素 (ASP.NET 設定スキーマ) セクションに対して、宣言によって値を指定する方法を示しています。

<system.web>
  <pages buffer="true" 
    enableSessionState="true" 
    enableViewState="true"
    enableViewStateMac="true" 
    autoEventWireup="true" 
    validateRequest="true">
    asyncTimeout="45"
    maintainScrollPositionOnPostBack = "False"
    viewStateEncryptionMode = "Auto"
    <namespaces>
      <add namespace="System" />
      <add namespace="System.Collections" />
      <add namespace="System.Collections.Specialized" />
      <add namespace="System.ComponentModel" />
      <add namespace="System.Configuration" />
      <add namespace="System.Web" />
    </namespaces>
    <controls>
      <clear />
      <remove tagPrefix="MyTags" />
      <!—- Searches all linked assemblies for the namespace -->
      <add tagPrefix="MyTags1" namespace=" MyNameSpace "/>
      <!-- Uses a specified assembly -->
      <add tagPrefix="MyTags2" namespace="MyNameSpace" 
        assembly="MyAssembly"/>
      <!-- Uses the specified source for the user control -->
      <add tagprefix="MyTags3" tagname="MyCtrl"     
        src="https://cdn.weblio.jp/e7/img/dict/msdnc/MyControl.ascx"/>
    </controls>
    <tagMapping>
      <clear />
      <add
        tagTypeName=
          "System.Web.UI.WebControls.WebParts.WebPartManager"
        mappedTagTypeName=
          "Microsoft.Sharepoint.WebPartPartManager, 
          MSPS.Web.dll, Version='2.0.0.0'" 
      />
      <remove tagTypeName="SomeOtherNS.Class, Assemblyname" />
    </tagMapping>
  </pages>
</system.web>

PagesSection クラスを使用する方法を次のコード例に示します。

Imports System
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Configuration
Imports System.Web.Configuration
Imports System.Web.UI

Namespace Samples.Aspnet.SystemWebConfiguration
  Class UsingPagesSection
    Public Shared Sub Main()
      Try
        ' Get the Web application configuration.
        Dim configuration As System.Configuration.Configuration
 = _
            System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("")

        ' Get the section.
        Dim pagesSection As System.Web.Configuration.PagesSection
 = _
            CType(configuration.GetSection("system.web/pages"),
 _
            System.Web.Configuration.PagesSection)

        ' Get the AutoImportVBNamespace property.
        Console.WriteLine( _
         "AutoImportVBNamespace: '{0}'", _
         pagesSection.Namespaces.AutoImportVBNamespace)

        ' Set the AutoImportVBNamespace property.
        pagesSection.Namespaces.AutoImportVBNamespace = True

        ' Get all current Namespaces in the collection.
        Dim i As Int16
        For i = 0 To pagesSection.Namespaces.Count
 - 1
          Console.WriteLine( _
           "Namespaces {0}: '{1}'", i, _
           pagesSection.Namespaces(i).Namespace)
        Next

        ' Create a new NamespaceInfo object.
        Dim namespaceInfo As System.Web.Configuration.NamespaceInfo
 = _
         New System.Web.Configuration.NamespaceInfo("System")

        ' Set the Namespace property.
        namespaceInfo.Namespace = "System.Collections"

        ' Execute the Add Method.
        pagesSection.Namespaces.Add(namespaceInfo)

        ' Add a NamespaceInfo object using a constructor.
        pagesSection.Namespaces.Add( _
         New System.Web.Configuration.NamespaceInfo( _
         "System.Collections.Specialized"))

        ' Execute the RemoveAt method.
        pagesSection.Namespaces.RemoveAt(0)

        ' Execute the Clear method.
        pagesSection.Namespaces.Clear()

        ' Execute the Remove method.
        pagesSection.Namespaces.Remove("System.Collections")

        ' Get the current AutoImportVBNamespace property value.
        Console.WriteLine( _
         "Current AutoImportVBNamespace value: '{0}'", _
         pagesSection.Namespaces.AutoImportVBNamespace)

        ' Set the AutoImportVBNamespace property to false.
        pagesSection.Namespaces.AutoImportVBNamespace = False

        ' Get the current PageParserFilterType property value.
        Console.WriteLine( _
            "Current PageParserFilterType value: '{0}'", _
            pagesSection.PageParserFilterType)

        ' Set the PageParserFilterType property to
        ' "MyNameSpace.AllowOnlySafeControls".
        pagesSection.PageParserFilterType = _
            "MyNameSpace.AllowOnlySafeControls"

        ' Get the current Theme property value.
        Console.WriteLine( _
            "Current Theme value: '{0}'", pagesSection.Theme)

        ' Set the Theme property to "MyCustomTheme".
        pagesSection.Theme = "MyCustomTheme"

        ' Get the current EnableViewState property value.
        Console.WriteLine( _
            "Current EnableViewState value: '{0}'", _
            pagesSection.EnableViewState)

        ' Set the EnableViewState property to false.
        pagesSection.EnableViewState = False

        ' Get the current CompilationMode property value.
        Console.WriteLine( _
            "Current CompilationMode value: '{0}'", _
            pagesSection.CompilationMode)

        ' Set the CompilationMode property to CompilationMode.Always.
        pagesSection.CompilationMode = CompilationMode.Always

        ' Get the current ValidateRequest property value.
        Console.WriteLine( _
            "Current ValidateRequest value: '{0}'", _
            pagesSection.ValidateRequest)

        ' Set the ValidateRequest property to true.
        pagesSection.ValidateRequest = True

        ' Get the current EnableViewStateMac property value.
        Console.WriteLine( _
            "Current EnableViewStateMac value: '{0}'", _
            pagesSection.EnableViewStateMac)

        ' Set the EnableViewStateMac property to true.
        pagesSection.EnableViewStateMac = True

        ' Get the current AutoEventWireup property value.
        Console.WriteLine( _
            "Current AutoEventWireup value: '{0}'", _
            pagesSection.AutoEventWireup)

        ' Set the AutoEventWireup property to false.
        pagesSection.AutoEventWireup = False

        ' Get the current MaxPageStateFieldLength property value.
        Console.WriteLine( _
            "Current MaxPageStateFieldLength value: '{0}'",
 _
            pagesSection.MaxPageStateFieldLength)

        ' Set the MaxPageStateFieldLength property to 4098.
        pagesSection.MaxPageStateFieldLength = 4098

        ' Get the current UserControlBaseType property value.
        Console.WriteLine( _
            "Current UserControlBaseType value: '{0}'", _
            pagesSection.UserControlBaseType)

        ' Set the UserControlBaseType property to
        ' "MyNameSpace.MyCustomControlBaseType".
        pagesSection.UserControlBaseType = _
            "MyNameSpace.MyCustomControlBaseType"

        ' Get all current Controls in the collection.
        Dim j As Int32
        For j = 0 To pagesSection.Controls.Count
 - 1
          Console.WriteLine("Control {0}:", j)
          Console.WriteLine("  TagPrefix = '{0}' ", _
           pagesSection.Controls(j).TagPrefix)
          Console.WriteLine("  TagName = '{0}' ", _
           pagesSection.Controls(j).TagName)
          Console.WriteLine("  Source = '{0}' ", _
           pagesSection.Controls(j).Source)
          Console.WriteLine("  Namespace = '{0}'
 ", _
           pagesSection.Controls(j).Namespace)
          Console.WriteLine("  Assembly = '{0}'
 ", _
           pagesSection.Controls(j).Assembly)
        Next

        ' Create a new TagPrefixInfo object.
        Dim tagPrefixInfo As System.Web.Configuration.TagPrefixInfo
 = _
         New System.Web.Configuration.TagPrefixInfo("MyCtrl",
 "MyNameSpace", "MyAssembly",
 "MyControl", "MyControl.ascx")

        ' Execute the Add Method.
        pagesSection.Controls.Add(tagPrefixInfo)

        ' Add a TagPrefixInfo object using a constructor.
        pagesSection.Controls.Add( _
         New System.Web.Configuration.TagPrefixInfo( _
         "MyCtrl", "MyNameSpace",
 "MyAssembly", "MyControl",
 _
         "MyControl.ascx"))

        ' Get the current StyleSheetTheme property value.
        Console.WriteLine( _
            "Current StyleSheetTheme value: '{0}'", _
            pagesSection.StyleSheetTheme)

        ' Set the StyleSheetTheme property to
        ' "MyCustomStyleSheetTheme".
        pagesSection.StyleSheetTheme = "MyCustomStyleSheetTheme"

        ' Get the current EnableSessionState property value.
        Console.WriteLine( _
            "Current EnableSessionState value: '{0}'", pagesSection.EnableSessionState)

        ' Set the EnableSessionState property to
        ' PagesEnableSessionState.ReadOnly.
        pagesSection.EnableSessionState = PagesEnableSessionState.ReadOnly

        ' Get the current MasterPageFile property value.
        Console.WriteLine( _
            "Current MasterPageFile value: '{0}'", _
            pagesSection.MasterPageFile)

        ' Set the MasterPageFile property to "MyMasterPage.ascx".
        pagesSection.MasterPageFile = "MyMasterPage.ascx"

        ' Get the current Buffer property value.
        Console.WriteLine( _
            "Current Buffer value: '{0}'", pagesSection.Buffer)

        ' Set the Buffer property to true.
        pagesSection.Buffer = True

        ' Get all current TagMappings in the collection.
        Dim k As Int32
        For k = 1 To pagesSection.TagMapping.Count
          Console.WriteLine("TagMapping {0}:", i)
          Console.WriteLine("  TagTypeName = '{0}'", _
           pagesSection.TagMapping(k).TagType)
          Console.WriteLine("  MappedTagTypeName = '{0}'",
 _
           pagesSection.TagMapping(k).MappedTagType)
        Next

        ' Add a TagMapInfo object using a constructor.
        pagesSection.TagMapping.Add( _
         New System.Web.Configuration.TagMapInfo( _
         "MyNameSpace.MyControl", "MyNameSpace.MyOtherControl"))

        ' Get the current PageBaseType property value.
        Console.WriteLine( _
            "Current PageBaseType value: '{0}'", pagesSection.PageBaseType)

        ' Set the PageBaseType property to
        ' "MyNameSpace.MyCustomPagelBaseType".
        pagesSection.PageBaseType = "MyNameSpace.MyCustomPagelBaseType"

        ' Get the current SmartNavigation property value.
        Console.WriteLine( _
            "Current SmartNavigation value: '{0}'", pagesSection.SmartNavigation)

        ' Set the SmartNavigation property to true.
        pagesSection.SmartNavigation = True

        ' Update if not locked.
        If Not pagesSection.SectionInformation.IsLocked
 Then
          configuration.Save()
          Console.WriteLine("** Configuration updated.")
        Else
          Console.WriteLine("** Could not update, section is locked.")
        End If
      Catch e As System.Exception
        ' Unknown error.
        Console.WriteLine("A unknown exception detected in "
 & _
        "UsingPagesSection Main.")
        Console.WriteLine(e)
      End Try
      Console.ReadLine()
    End Sub
  End Class ' UsingPagesSection.
End Namespace ' Samples.Aspnet.SystemWebConfiguration
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Configuration;
using System.Web.Configuration;
using System.Web.UI;


namespace Samples.Aspnet.SystemWebConfiguration
{
  class UsingPagesSection
  {
    public static void Main()
    {
      try
      {
        // Get the Web application configuration.
        Configuration configuration =
          WebConfigurationManager.OpenWebConfiguration("");

        // Get the section.
        PagesSection pagesSection =
            (PagesSection)configuration.GetSection("system.web/pages");

        // Get the AutoImportVBNamespace property.
        Console.WriteLine("AutoImportVBNamespace: '{0}'",
            pagesSection.Namespaces.AutoImportVBNamespace.ToString());

        // Set the AutoImportVBNamespace property.
        pagesSection.Namespaces.AutoImportVBNamespace = true;
 
        // Get all current Namespaces in the collection.
        for (int i = 0; i < pagesSection.Namespaces.Count;
 i++)
        {
          Console.WriteLine(
              "Namespaces {0}: '{1}'", i,
              pagesSection.Namespaces[i].Namespace);
        }

        // Create a new NamespaceInfo object.
        System.Web.Configuration.NamespaceInfo namespaceInfo =
            new System.Web.Configuration.NamespaceInfo("System");

        // Set the Namespace property.
        namespaceInfo.Namespace = "System.Collections";

        // Execute the Add Method.
        pagesSection.Namespaces.Add(namespaceInfo);

        // Add a NamespaceInfo object using a constructor.
        pagesSection.Namespaces.Add(
            new System.Web.Configuration.NamespaceInfo(
            "System.Collections.Specialized"));

        // Execute the RemoveAt method.
        pagesSection.Namespaces.RemoveAt(0);

        // Execute the Clear method.
        pagesSection.Namespaces.Clear();

        // Execute the Remove method.
        pagesSection.Namespaces.Remove("System.Collections");

        // Get the current AutoImportVBNamespace property value.
        Console.WriteLine(
            "Current AutoImportVBNamespace value: '{0}'",
            pagesSection.Namespaces.AutoImportVBNamespace);

        // Set the AutoImportVBNamespace property to false.
        pagesSection.Namespaces.AutoImportVBNamespace = false;

        // Get the current PageParserFilterType property value.
        Console.WriteLine(
            "Current PageParserFilterType value: '{0}'",
            pagesSection.PageParserFilterType);

        // Set the PageParserFilterType property to
        // "MyNameSpace.AllowOnlySafeControls".
        pagesSection.PageParserFilterType =
            "MyNameSpace.AllowOnlySafeControls";

        // Get the current Theme property value.
        Console.WriteLine(
            "Current Theme value: '{0}'",
            pagesSection.Theme);

        // Set the Theme property to "MyCustomTheme".
        pagesSection.Theme = "MyCustomTheme";

        // Get the current EnableViewState property value.
        Console.WriteLine(
            "Current EnableViewState value: '{0}'",
            pagesSection.EnableViewState);

        // Set the EnableViewState property to false.
        pagesSection.EnableViewState = false;

        // Get the current CompilationMode property value.
        Console.WriteLine(
            "Current CompilationMode value: '{0}'",
            pagesSection.CompilationMode);

        // Set the CompilationMode property to CompilationMode.Always.
        pagesSection.CompilationMode = CompilationMode.Always;

        // Get the current ValidateRequest property value.
        Console.WriteLine(
            "Current ValidateRequest value: '{0}'",
            pagesSection.ValidateRequest);

        // Set the ValidateRequest property to true.
        pagesSection.ValidateRequest = true;

        // Get the current EnableViewStateMac property value.
        Console.WriteLine(
            "Current EnableViewStateMac value: '{0}'",
            pagesSection.EnableViewStateMac);

        // Set the EnableViewStateMac property to true.
        pagesSection.EnableViewStateMac = true;

        // Get the current AutoEventWireup property value.
        Console.WriteLine(
            "Current AutoEventWireup value: '{0}'",
            pagesSection.AutoEventWireup);

        // Set the AutoEventWireup property to false.
        pagesSection.AutoEventWireup = false;

        // Get the current MaxPageStateFieldLength property value.
        Console.WriteLine(
            "Current MaxPageStateFieldLength value: '{0}'",
            pagesSection.MaxPageStateFieldLength);

        // Set the MaxPageStateFieldLength property to 4098.
        pagesSection.MaxPageStateFieldLength = 4098;

        // Get the current UserControlBaseType property value.
        Console.WriteLine(
            "Current UserControlBaseType value: '{0}'",
            pagesSection.UserControlBaseType);

        // Set the UserControlBaseType property to
        // "MyNameSpace.MyCustomControlBaseType".
        pagesSection.UserControlBaseType =
            "MyNameSpace.MyCustomControlBaseType";

        // Get all current Controls in the collection.
        for (int i = 0; i < pagesSection.Controls.Count;
 i++)
        {
          Console.WriteLine("Control {0}:", i);
          Console.WriteLine("  TagPrefix = '{0}' ",
              pagesSection.Controls[i].TagPrefix);
          Console.WriteLine("  TagName = '{0}' ",
              pagesSection.Controls[i].TagName);
          Console.WriteLine("  Source = '{0}' ",
              pagesSection.Controls[i].Source);
          Console.WriteLine("  Namespace = '{0}' ",
              pagesSection.Controls[i].Namespace);
          Console.WriteLine("  Assembly = '{0}' ",
              pagesSection.Controls[i].Assembly);
        }

        // Create a new TagPrefixInfo object.
        System.Web.Configuration.TagPrefixInfo tagPrefixInfo =
            new System.Web.Configuration.TagPrefixInfo("MyCtrl",
 "MyNameSpace", "MyAssembly", "MyControl", "MyControl.ascx");

        // Execute the Add Method.
        pagesSection.Controls.Add(tagPrefixInfo);

        // Add a TagPrefixInfo object using a constructor.
        pagesSection.Controls.Add(
            new System.Web.Configuration.TagPrefixInfo(
            "MyCtrl", "MyNameSpace", "MyAssembly",
 "MyControl",
            "MyControl.ascx"));

        // Get the current StyleSheetTheme property value.
        Console.WriteLine(
            "Current StyleSheetTheme value: '{0}'",
            pagesSection.StyleSheetTheme);

        // Set the StyleSheetTheme property.
        pagesSection.StyleSheetTheme =
            "MyCustomStyleSheetTheme";

        // Get the current EnableSessionState property value.
        Console.WriteLine(
            "Current EnableSessionState value: '{0}'",
            pagesSection.EnableSessionState);

        // Set the EnableSessionState property to
        // PagesEnableSessionState.ReadOnly.
        pagesSection.EnableSessionState =
            PagesEnableSessionState.ReadOnly;
 
        // Get the current MasterPageFile property value.
        Console.WriteLine(
            "Current MasterPageFile value: '{0}'",
            pagesSection.MasterPageFile);

        // Set the MasterPageFile property to "MyMasterPage.ascx".
        pagesSection.MasterPageFile = "MyMasterPage.ascx";

        // Get the current Buffer property value.
        Console.WriteLine(
            "Current Buffer value: '{0}'", pagesSection.Buffer);

        // Set the Buffer property to true.
        pagesSection.Buffer = true;

        // Get all current TagMappings in the collection.
        for (int i = 0; i < pagesSection.TagMapping.Count;
 i++)
        {
          Console.WriteLine("TagMapping {0}:", i);
          Console.WriteLine("  TagTypeName = '{0}'",
              pagesSection.TagMapping[i].TagType);
          Console.WriteLine("  MappedTagTypeName = '{0}'",
              pagesSection.TagMapping[i].MappedTagType);
        }

        // Add a TagMapInfo object using a constructor.
        pagesSection.TagMapping.Add(
            new System.Web.Configuration.TagMapInfo(
            "MyNameSpace.MyControl", "MyNameSpace.MyOtherControl"));

        // Get the current PageBaseType property value.
        Console.WriteLine(
            "Current PageBaseType value: '{0}'",
            pagesSection.PageBaseType);

        // Set the PageBaseType property to
        // "MyNameSpace.MyCustomPagelBaseType".
        pagesSection.PageBaseType =
            "MyNameSpace.MyCustomPagelBaseType";

        // Get the current SmartNavigation property value.
        Console.WriteLine(
            "Current SmartNavigation value: '{0}'",
            pagesSection.SmartNavigation);

        // Set the SmartNavigation property to true.
        pagesSection.SmartNavigation = true;

        // Update if not locked.
        if (!pagesSection.SectionInformation.IsLocked)
        {
          configuration.Save();
          Console.WriteLine("** Configuration updated.");
        }
        else
          Console.WriteLine("** Could not update, section is locked.");
      }
      catch (System.Exception e)
      {
        // Unknown error.
        Console.WriteLine("A unknown exception detected in"
 +
          "UsingPagesSection Main.");
        Console.WriteLine(e);
      }
      Console.ReadLine();
    }
  } // UsingPagesSection class end.
} // Samples.Aspnet.SystemWebConfiguration namespace end.
継承階層継承階層
System.Object
   System.Configuration.ConfigurationElement
     System.Configuration.ConfigurationSection
      System.Web.Configuration.PagesSection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

PagesSection コンストラクタ

メモ : このコンストラクタは、.NET Framework version 2.0 で新しく追加されたものです。

既定の設定を使用して PagesSection クラスの新しいインスタンスを初期化します。

名前空間: System.Web.Configuration
アセンブリ: System.Web (system.web.dll 内)
構文構文

public PagesSection ()
public:
PagesSection ()
public PagesSection ()
public function PagesSection ()
解説解説

PagesSection コンストラクタは、コードで直接使用するためのものではありません。ASP.NET 構成システムによって呼び出されます。PagesSection クラスのインスタンスは、GetSection メソッドを使用して取得します。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PagesSection クラス
PagesSection メンバ
System.Web.Configuration 名前空間

PagesSection プロパティ


パブリック プロパティパブリック プロパティ

( プロテクト プロパティ も参照)
  名前 説明
パブリック プロパティ AsyncTimeout 非同期ページ処理中に非同期ハンドラが完了するのを待つ秒数を示す値を取得または設定します。
パブリック プロパティ AutoEventWireup ASP.NET ページのイベントを自動的にイベント処理関数に渡すかどうかを示す値を取得または設定します。
パブリック プロパティ Buffer .aspx ページおよび .ascx コントロールが応答バッファを使用するかどうかを指定する値を取得または設定します。
パブリック プロパティ CompilationMode .aspx ページおよび .ascx コントロールのコンパイル方法を指定する値を取得または設定します。
パブリック プロパティ Controls TagPrefixInfo オブジェクトのコレクションを取得します。
パブリック プロパティ ElementInformation  ConfigurationElement オブジェクトのカスタマイズできない情報と機能を格納する ElementInformation オブジェクトを取得します。 ( ConfigurationElement から継承されます。)
パブリック プロパティ EnableEventValidation イベントの検証を有効にする値を取得または設定します。
パブリック プロパティ EnableSessionState セッション状態が有効かどうか、または読み取り専用かどうかを指定する値を取得または設定します。
パブリック プロパティ EnableViewState ビューステートが有効かどうかを示す値を取得または設定します。
パブリック プロパティ EnableViewStateMac ページがクライアントからポスト バックされたときに ASP.NET がページのビューステートでメッセージ認証コード (MAC) を実行する必要があるかどうかを指定する値を取得または設定します。
パブリック プロパティ LockAllAttributesExcept  ロックされている属性のコレクションを取得します。 ( ConfigurationElement から継承されます。)
パブリック プロパティ LockAllElementsExcept  ロックされている要素のコレクションを取得します。 ( ConfigurationElement から継承されます。)
パブリック プロパティ LockAttributes  ロックされている属性のコレクションを取得します。 ( ConfigurationElement から継承されます。)
パブリック プロパティ LockElements  ロックされている要素のコレクションを取得します。 ( ConfigurationElement から継承されます。)
パブリック プロパティ LockItem  要素がロックされているかどうかを示す値を取得または設定します。 ( ConfigurationElement から継承されます。)
パブリック プロパティ MaintainScrollPositionOnPostBack ポストバック後にサーバーから戻ってきたとき、ページのスクロール位置を保持するかどうかを示す値を取得または設定します。
パブリック プロパティ MasterPageFile アプリケーションのマスター ページへの参照を取得または設定します。
パブリック プロパティ MaxPageStateFieldLength 単一のビューステート フィールドに格納できる最大文字数を取得または設定します。
パブリック プロパティ Namespaces NamespaceInfo オブジェクトのコレクションを取得します。
パブリック プロパティ PageBaseType 既定で .aspx ページが継承する分離コード クラスを指定する値を取得または設定します。
パブリック プロパティ PageParserFilterType パーサーのフィルタ タイプを指定する値を取得または設定します。
パブリック プロパティ SectionInformation  ConfigurationSection オブジェクトのカスタマイズできない情報と機能を格納する SectionInformation オブジェクトを取得します。 ( ConfigurationSection から継承されます。)
パブリック プロパティ SmartNavigation スマート ナビゲーションが有効かどうかを示す値を取得または設定します。
パブリック プロパティ StyleSheetTheme ASP.NET スタイル シートのテーマ名を取得または設定します。
パブリック プロパティ TagMapping TagMapInfo オブジェクトのコレクションを取得します。
パブリック プロパティ Theme ASP.NET ページのテーマ名を取得または設定します。
パブリック プロパティ UserControlBaseType 既定でユーザー コントロールが継承する分離コード クラスを指定する値を取得または設定します。
パブリック プロパティ ValidateRequest ブラウザからの入力値の安全性を調べるかどうかを指定する値を取得または設定します。
パブリック プロパティ ViewStateEncryptionMode ViewState 値を保持する際に使用される暗号化モードを取得または設定します。
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ ElementProperty  ConfigurationElement オブジェクト自体を表す ConfigurationElementProperty オブジェクトを取得します。 ( ConfigurationElement から継承されます。)
プロテクト プロパティ EvaluationContext  ConfigurationElement オブジェクトの ContextInformation オブジェクトを取得します。 ( ConfigurationElement から継承されます。)
プロテクト プロパティ Item  オーバーロードされます。 この ConfigurationElement オブジェクトのプロパティ、属性、または子要素を取得または設定します。 ( ConfigurationElement から継承されます。)
プロテクト プロパティ Properties  プロパティのコレクションを取得します。 ( ConfigurationElement から継承されます。)
参照参照

関連項目

PagesSection クラス
System.Web.Configuration 名前空間
ConfigurationSection

その他の技術情報

pages 要素 (ASP.NET 設定スキーマ)
ASP.NET Web ページのディレクティブ
ディレクティブ構文

PagesSection メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド DeserializeElement  構成ファイルから XML を読み取ります。 ( ConfigurationElement から継承されます。)
プロテクト メソッド DeserializeSection  構成ファイルから XML を読み取ります。 ( ConfigurationSection から継承されます。)
プロテクト メソッド Finalize  Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。)
プロテクト メソッド GetRuntimeObject  派生クラスでオーバーライドされると、カスタム オブジェクトを返します。 ( ConfigurationSection から継承されます。)
プロテクト メソッド Init  ConfigurationElement オブジェクトを初期状態に設定します。 ( ConfigurationElement から継承されます。)
プロテクト メソッド InitializeDefault  ConfigurationElement オブジェクトの既定の値セットを初期化するために使用します。 ( ConfigurationElement から継承されます。)
プロテクト メソッド IsModified  派生クラスに実装された場合、この構成要素が最後の保存または読み込み以降に変更されたかどうかを示します。 ( ConfigurationSection から継承されます。)
プロテクト メソッド ListErrors  この ConfigurationElement オブジェクトおよびすべてのサブ要素の無効なプロパティのエラーを、渡されたリストに追加します。 ( ConfigurationElement から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object の簡易コピーを作成します。 ( Object から継承されます。)
プロテクト メソッド OnDeserializeUnrecognizedAttribute  逆シリカル化中に不明な属性が発生したかどうかを示す値を取得します。 ( ConfigurationElement から継承されます。)
プロテクト メソッド OnDeserializeUnrecognizedElement  逆シリカル化中に不明な要素が発生したかどうかを示す値を取得します。 ( ConfigurationElement から継承されます。)
プロテクト メソッド OnRequiredPropertyNotFound  必須プロパティが見つからなかったかどうかを示す値を取得します。 ( ConfigurationElement から継承されます。)
プロテクト メソッド PostDeserialize  逆シリアル化後に呼び出されます。 ( ConfigurationElement から継承されます。)
プロテクト メソッド PreSerialize  シリアル化前に呼び出されます。 ( ConfigurationElement から継承されます。)
プロテクト メソッド Reset  ConfigurationElement オブジェクトの内部状態 (ロックやプロパティ コレクションなど) をリセットします。 ( ConfigurationElement から継承されます。)
プロテクト メソッド ResetModified  派生クラスに実装された場合、IsModified メソッドの値を false にリセットします。 ( ConfigurationSection から継承されます。)
プロテクト メソッド SerializeElement  派生クラスに実装されている場合、この構成要素の内容を構成ファイルに書き込みます。 ( ConfigurationElement から継承されます。)
プロテクト メソッド SerializeSection  ファイルに書き込む 1 つのセクションとして、ConfigurationSection オブジェクトのアンマージされたビューを含む XML 文字列を作成します。 ( ConfigurationSection から継承されます。)
プロテクト メソッド SerializeToXmlElement  派生クラスに実装されている場合、この構成要素の外側のタグを構成ファイルに書き込みます。 ( ConfigurationElement から継承されます。)
プロテクト メソッド SetPropertyValue  プロパティを指定した値に設定します。 ( ConfigurationElement から継承されます。)
プロテクト メソッド SetReadOnly  ConfigurationElement オブジェクトおよびすべてのサブ要素に IsReadOnly プロパティを設定します。 ( ConfigurationElement から継承されます。)
プロテクト メソッド Unmerge  保存しないすべての値を削除するには、ConfigurationElement オブジェクトを変更します。 ( ConfigurationElement から継承されます。)
参照参照

関連項目

PagesSection クラス
System.Web.Configuration 名前空間
ConfigurationSection

その他の技術情報

pages 要素 (ASP.NET 設定スキーマ)
ASP.NET Web ページのディレクティブ
ディレクティブ構文

PagesSection メンバ

構成ファイルの pages 要素 (ASP.NET 設定スキーマ) セクションにプログラムからアクセスできるようにします。このクラスは継承できません。

PagesSection データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ も参照)
  名前 説明
パブリック プロパティ AsyncTimeout 非同期ページ処理中に非同期ハンドラが完了するのを待つ秒数を示す値を取得または設定します。
パブリック プロパティ AutoEventWireup ASP.NET ページのイベントを自動的にイベント処理関数に渡すかどうかを示す値を取得または設定します。
パブリック プロパティ Buffer .aspx ページおよび .ascx コントロールが応答バッファを使用するかどうかを指定する値を取得または設定します。
パブリック プロパティ CompilationMode .aspx ページおよび .ascx コントロールのコンパイル方法を指定する値を取得または設定します。
パブリック プロパティ Controls TagPrefixInfo オブジェクトのコレクションを取得します。
パブリック プロパティ ElementInformation  ConfigurationElement オブジェクトのカスタマイズできない情報と機能を格納する ElementInformation オブジェクトを取得します。 (ConfigurationElement から継承されます。)
パブリック プロパティ EnableEventValidation イベントの検証を有効にする値を取得または設定します。
パブリック プロパティ EnableSessionState セッション状態が有効かどうか、または読み取り専用かどうかを指定する値を取得または設定します。
パブリック プロパティ EnableViewState ビューステートが有効かどうかを示す値を取得または設定します。
パブリック プロパティ EnableViewStateMac ページがクライアントからポスト バックされたときに ASP.NET がページのビューステートでメッセージ認証コード (MAC) を実行する必要があるかどうかを指定する値を取得または設定します。
パブリック プロパティ LockAllAttributesExcept  ロックされている属性のコレクションを取得します。(ConfigurationElement から継承されます。)
パブリック プロパティ LockAllElementsExcept  ロックされている要素のコレクションを取得します。(ConfigurationElement から継承されます。)
パブリック プロパティ LockAttributes  ロックされている属性のコレクションを取得します。 (ConfigurationElement から継承されます。)
パブリック プロパティ LockElements  ロックされている要素のコレクションを取得します。(ConfigurationElement から継承されます。)
パブリック プロパティ LockItem  要素がロックされているかどうかを示す値を取得または設定します。(ConfigurationElement から継承されます。)
パブリック プロパティ MaintainScrollPositionOnPostBack ポストバック後にサーバーから戻ってきたとき、ページのスクロール位置を保持するかどうかを示す値を取得または設定します。
パブリック プロパティ MasterPageFile アプリケーションのマスター ページへの参照を取得または設定します。
パブリック プロパティ MaxPageStateFieldLength 単一のビューステート フィールドに格納できる最大文字数を取得または設定します。
パブリック プロパティ Namespaces NamespaceInfo オブジェクトのコレクションを取得します。
パブリック プロパティ PageBaseType 既定で .aspx ページが継承する分離コード クラスを指定する値を取得または設定します。
パブリック プロパティ PageParserFilterType パーサーのフィルタ タイプを指定する値を取得または設定します。
パブリック プロパティ SectionInformation  ConfigurationSection オブジェクトのカスタマイズできない情報と機能を格納する SectionInformation オブジェクトを取得します。 (ConfigurationSection から継承されます。)
パブリック プロパティ SmartNavigation スマート ナビゲーションが有効かどうかを示す値を取得または設定します。
パブリック プロパティ StyleSheetTheme ASP.NET スタイル シートのテーマ名を取得または設定します。
パブリック プロパティ TagMapping TagMapInfo オブジェクトのコレクションを取得します。
パブリック プロパティ Theme ASP.NET ページのテーマ名を取得または設定します。
パブリック プロパティ UserControlBaseType 既定でユーザー コントロールが継承する分離コード クラスを指定する値を取得または設定します。
パブリック プロパティ ValidateRequest ブラウザからの入力値の安全性を調べるかどうかを指定する値を取得または設定します。
パブリック プロパティ ViewStateEncryptionMode ViewState 値を保持する際に使用される暗号化モードを取得または設定します。
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ ElementProperty  ConfigurationElement オブジェクト自体を表す ConfigurationElementProperty オブジェクトを取得します。(ConfigurationElement から継承されます。)
プロテクト プロパティ EvaluationContext  ConfigurationElement オブジェクトの ContextInformation オブジェクトを取得します。(ConfigurationElement から継承されます。)
プロテクト プロパティ Item  オーバーロードされます。 この ConfigurationElement オブジェクトのプロパティ、属性、または子要素を取得または設定します。(ConfigurationElement から継承されます。)
プロテクト プロパティ Properties  プロパティのコレクションを取得します。(ConfigurationElement から継承されます。)
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド DeserializeElement  構成ファイルから XML を読み取ります。 (ConfigurationElement から継承されます。)
プロテクト メソッド DeserializeSection  構成ファイルから XML を読み取ります。 (ConfigurationSection から継承されます。)
プロテクト メソッド Finalize  Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。)
プロテクト メソッド GetRuntimeObject  派生クラスでオーバーライドされると、カスタム オブジェクトを返します。 (ConfigurationSection から継承されます。)
プロテクト メソッド Init  ConfigurationElement オブジェクトを初期状態に設定します。 (ConfigurationElement から継承されます。)
プロテクト メソッド InitializeDefault  ConfigurationElement オブジェクトの既定の値セットを初期化するために使用します。 (ConfigurationElement から継承されます。)
プロテクト メソッド IsModified  派生クラスに実装された場合、この構成要素が最後の保存または読み込み以降に変更されたかどうかを示します。 (ConfigurationSection から継承されます。)
プロテクト メソッド ListErrors  この ConfigurationElement オブジェクトおよびすべてのサブ要素の無効なプロパティのエラーを、渡されたリストに追加します。 (ConfigurationElement から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object の簡易コピーを作成します。 (Object から継承されます。)
プロテクト メソッド OnDeserializeUnrecognizedAttribute  逆シリカル化中に不明な属性が発生したかどうかを示す値を取得します。 (ConfigurationElement から継承されます。)
プロテクト メソッド OnDeserializeUnrecognizedElement  逆シリカル化中に不明な要素が発生したかどうかを示す値を取得します。 (ConfigurationElement から継承されます。)
プロテクト メソッド OnRequiredPropertyNotFound  必須プロパティが見つからなかったかどうかを示す値を取得します。 (ConfigurationElement から継承されます。)
プロテクト メソッド PostDeserialize  逆シリアル化後に呼び出されます。 (ConfigurationElement から継承されます。)
プロテクト メソッド PreSerialize  シリアル化前に呼び出されます。 (ConfigurationElement から継承されます。)
プロテクト メソッド Reset  ConfigurationElement オブジェクトの内部状態 (ロックやプロパティ コレクションなど) をリセットします。 (ConfigurationElement から継承されます。)
プロテクト メソッド ResetModified  派生クラスに実装された場合、IsModified メソッドの値を false にリセットします。 (ConfigurationSection から継承されます。)
プロテクト メソッド SerializeElement  派生クラスに実装されている場合、この構成要素の内容を構成ファイルに書き込みます。 (ConfigurationElement から継承されます。)
プロテクト メソッド SerializeSection  ファイルに書き込む 1 つのセクションとして、ConfigurationSection オブジェクトのアンマージされたビューを含む XML 文字列を作成します。 (ConfigurationSection から継承されます。)
プロテクト メソッド SerializeToXmlElement  派生クラスに実装されている場合、この構成要素の外側のタグを構成ファイルに書き込みます。 (ConfigurationElement から継承されます。)
プロテクト メソッド SetPropertyValue  プロパティを指定した値に設定します。 (ConfigurationElement から継承されます。)
プロテクト メソッド SetReadOnly  ConfigurationElement オブジェクトおよびすべてのサブ要素に IsReadOnly プロパティを設定します。 (ConfigurationElement から継承されます。)
プロテクト メソッド Unmerge  保存しないすべての値を削除するには、ConfigurationElement オブジェクトを変更します。 (ConfigurationElement から継承されます。)
参照参照

関連項目

PagesSection クラス
System.Web.Configuration 名前空間
ConfigurationSection

その他の技術情報

pages 要素 (ASP.NET 設定スキーマ)
ASP.NET Web ページのディレクティブ
ディレクティブ構文



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「PagesSection」の関連用語

PagesSectionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



PagesSectionのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS