PagesSection Klasse

Definition

Ermöglicht den programmgesteuerten Zugriff auf den pages-Abschnitt der Konfigurationsdatei. Diese Klasse kann nicht vererbt werden.

public ref class PagesSection sealed : System::Configuration::ConfigurationSection
public sealed class PagesSection : System.Configuration.ConfigurationSection
type PagesSection = class
    inherit ConfigurationSection
Public NotInheritable Class PagesSection
Inherits ConfigurationSection
Vererbung

Beispiele

In diesem Beispiel wird veranschaulicht, wie Werte deklarativ für mehrere Attribute des Abschnitts angegeben werden, auf die pages auch als Member der PagesSection -Klasse zugegriffen werden kann.

Im folgenden Konfigurationsdateibeispiel wird gezeigt, wie Werte für den Abschnitt seiten deklarativ angegeben werden.

<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="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>

Im folgenden Codebeispiel wird die Verwendung der PagesSection -Klasse veranschaulicht.

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.
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
End Namespace ' Samples.Aspnet.SystemWebConfiguration

Hinweise

Die PagesSection -Klasse bietet eine Möglichkeit, programmgesteuert auf den Inhalt des Abschnitts der Konfigurationsdateiseiten zuzugreifen und diesen zu ändern. Dieser Konfigurationsabschnitt unterstützt das globale Festlegen bestimmter ASP.NET Seiten- und Steuerelementdirektiven für alle Seiten und Steuerelemente im Bereich der Konfigurationsdatei. Dies umfasst die @ Page -Direktive, die @ Import -Direktive über die Namespaces Auflistungseigenschaft und die @ Register -Direktive über die Auflistungseigenschaft Controls . Es bietet auch Unterstützung für das Zuordnen von Tagtypen zu anderen Tagtypen zur Laufzeit über die Auflistungseigenschaft TagMapping .

Direktiven geben Einstellungen an, die von seiten- und Benutzersteuerungscompilern verwendet werden, wenn sie ASP.NET Web Forms Seitendateien (.aspx) und Benutzersteuerelementdateien (.ascx) verarbeiten.

Konstruktoren

PagesSection()

Initialisiert eine neue Instanz der PagesSection-Klasse mit Standardeinstellungen.

Eigenschaften

AsyncTimeout

Ruft einen Wert ab, der die Anzahl von Sekunden bis zum Abschluss der Ausführung eines asynchronen Handlers während der asynchronen Seitenverarbeitung angibt, oder legt diesen fest.

AutoEventWireup

Ruft einen Wert ab, der angibt, ob Ereignisse für ASP.NET-Seiten automatisch mit Ereignisbehandlungsfunktionen verbunden werden.

Buffer

Ruft einen Wert ab, der angibt, ob ASPX-Seiten und ASCX-Steuerelemente Antwortpufferung verwenden, oder legt diesen fest.

ClientIDMode

Ruft den Standardalgorithmus ab, der verwendet wird, um den Bezeichner eines Steuerelements zu generieren, oder legt ihn fest.

CompilationMode

Ruft einen Wert ab, der bestimmt, wie ASPX-Seiten und ASCX-Steuerelemente kompiliert werden, oder legt diesen fest.

ControlRenderingCompatibilityVersion

Ruft einen Wert ab, der die ASP.NET-Version angibt, mit der jedes beliebige gerenderte HTML-Objekt kompatibel ist.

Controls

Ruft eine Auflistung von TagPrefixInfo-Objekten ab.

CurrentConfiguration

Ruft einen Verweis auf die Configuration-Instanz der obersten Ebene ab, die die Konfigurationshierarchie darstellt, zu der die aktuelle ConfigurationElement-Instanz gehört.

(Geerbt von ConfigurationElement)
ElementInformation

Ruft ein ElementInformation-Objekt ab, das die nicht anpassbaren Informationen und Funktionen des ConfigurationElement-Objekts enthält.

(Geerbt von ConfigurationElement)
ElementProperty

Ruft das ConfigurationElementProperty-Objekt ab, das das ConfigurationElement-Objekt selbst darstellt.

(Geerbt von ConfigurationElement)
EnableEventValidation

Ruft einen Wert ab, der angibt, ob die Ereignisvalidierung aktiviert ist, oder legt diesen fest.

EnableSessionState

Ruft einen Wert ab, der angibt, ob der Sitzungszustand aktiviert, deaktiviert oder schreibgeschützt ist, oder legt diesen fest.

EnableViewState

Ruft einen Wert ab, der angibt, ob der Ansichtszustand aktiviert oder deaktiviert ist, oder legt diesen fest.

EnableViewStateMac

Ruft einen Wert ab, der angibt, ob ASP.NET den Ansichtszustand der Seite mit einem Nachrichtenauthentifizierungscode (MAC, Message Authentication Code) überprüfen soll, wenn die Seite vom Client zurückgesendet wird.

EvaluationContext

Ruft das ContextInformation-Objekt für das ConfigurationElement-Objekt ab.

(Geerbt von ConfigurationElement)
HasContext

Ruft einen Wert ab, der angibt, ob die CurrentConfiguration-Eigenschaft null ist.

(Geerbt von ConfigurationElement)
IgnoreDeviceFilters

Ruft die Auflistung von Gerätetags ab, die von ASP.NET beim Rendern einer Seite zu ignorieren sind.

Item[ConfigurationProperty]

Ruft eine Eigenschaft oder ein Attribut dieses Konfigurationselements ab oder legt diese bzw. dieses fest.

(Geerbt von ConfigurationElement)
Item[String]

Ruft eine Eigenschaft, ein Attribut oder ein untergeordnetes Element dieses Konfigurationselements ab oder legt diese(s) fest.

(Geerbt von ConfigurationElement)
LockAllAttributesExcept

Ruft die Auflistung gesperrter Attribute ab.

(Geerbt von ConfigurationElement)
LockAllElementsExcept

Ruft die Auflistung gesperrter Elemente ab.

(Geerbt von ConfigurationElement)
LockAttributes

Ruft die Auflistung gesperrter Attribute ab.

(Geerbt von ConfigurationElement)
LockElements

Ruft die Auflistung gesperrter Elemente ab.

(Geerbt von ConfigurationElement)
LockItem

Ruft einen Wert ab, der angibt, ob das Element gesperrt ist, oder legt diesen fest.

(Geerbt von ConfigurationElement)
MaintainScrollPositionOnPostBack

Ruft einen Wert ab, der angibt, ob die Seitenbildlaufposition nach dem Postback vom Server beibehalten werden soll, oder legt diesen fest.

MasterPageFile

Ruft einen Verweis auf die Masterseite für die Anwendung ab oder legt diesen fest.

MaxPageStateFieldLength

Ruft die maximale Anzahl von Zeichen ab, die ein einzelnes Ansichtszustandsfeld enthalten kann, oder legt diese fest.

Namespaces

Ruft eine Auflistung von NamespaceInfo-Objekten ab.

PageBaseType

Ruft einen Wert ab, der eine CodeBehind-Klasse angibt, die ASPX-Seiten standardmäßig erben, oder legt diesen fest.

PageParserFilterType

Ruft einen Wert ab, der den Parserfiltertyp angibt, oder legt diesen fest.

Properties

Ruft die Auflistung von Eigenschaften ab.

(Geerbt von ConfigurationElement)
RenderAllHiddenFieldsAtTopOfForm

Ruft einen Wert ab, der angibt, ob alle vom System generierten ausgeblendeten Felder im oberen Bereich des Formulars gerendert werden, oder legt diesen fest.

SectionInformation

Ruft ein SectionInformation-Objekt ab, das die nicht anpassbaren Informationen und Funktionen des ConfigurationSection-Objekts enthält.

(Geerbt von ConfigurationSection)
SmartNavigation

Ruft einen Wert ab, der angibt, ob die intelligente Navigation aktiviert ist, oder legt diesen fest.

StyleSheetTheme

Ruft den Namen eines ASP.NET-Stylesheetdesigns ab oder legt diesen fest.

TagMapping

Ruft eine Auflistung von TagMapInfo-Objekten ab.

Theme

Ruft den Namen eines ASP.NET-Seitendesigns ab oder legt diesen fest.

UserControlBaseType

Ruft einen Wert ab, der eine CodeBehind-Klasse angibt, die Benutzersteuerelemente standardmäßig erben, oder legt diesen fest.

ValidateRequest

Ruft einen Wert ab, der angibt, ob ASP.NET Eingabedaten vom Browser auf gefährliche Werte überprüft, oder legt diesen fest. Weitere Informationen finden Sie unter Übersicht über Skriptangriffe.

ViewStateEncryptionMode

Ruft den Verschlüsselungsmodus ab, den ASP.NET verwendet, wenn ViewState-Werte beibehalten werden, oder legt diesen fest.

Methoden

DeserializeElement(XmlReader, Boolean)

Liest XML aus der Konfigurationsdatei.

(Geerbt von ConfigurationElement)
DeserializeSection(XmlReader)

Liest XML aus der Konfigurationsdatei.

(Geerbt von ConfigurationSection)
Equals(Object)

Vergleicht die aktuelle ConfigurationElement-Instanz mit dem angegebenen Objekt.

(Geerbt von ConfigurationElement)
GetHashCode()

Ruft einen eindeutigen Wert ab, der die aktuelle ConfigurationElement-Instanz darstellt.

(Geerbt von ConfigurationElement)
GetRuntimeObject()

Gibt ein benutzerdefiniertes Objekt zurück, wenn es in einer abgeleiteten Klasse überschrieben wird.

(Geerbt von ConfigurationSection)
GetTransformedAssemblyString(String)

Gibt die transformierte Version des angegebenen Assemblynamens zurück.

(Geerbt von ConfigurationElement)
GetTransformedTypeString(String)

Gibt die transformierte Version des angegebenen Typnamens zurück.

(Geerbt von ConfigurationElement)
GetType()

Ruft den Type der aktuellen Instanz ab.

(Geerbt von Object)
Init()

Legt für das ConfigurationElement-Objekt den Ausgangszustand fest.

(Geerbt von ConfigurationElement)
InitializeDefault()

Wird verwendet, um einen Standardsatz von Werten für das ConfigurationElement-Objekt zu initialisieren.

(Geerbt von ConfigurationElement)
IsModified()

Gibt an, ob dieses Konfigurationselement geändert wurde, seit es zuletzt gespeichert oder geladen wurde, wenn es in einer abgeleiteten Klasse implementiert wurde.

(Geerbt von ConfigurationSection)
IsReadOnly()

Ruft einen Wert ab, der angibt, ob das ConfigurationElement schreibgeschützt ist.

(Geerbt von ConfigurationElement)
ListErrors(IList)

Fügt die Fehler über ungültige Eigenschaften in diesem ConfigurationElement-Objekt und in allen Unterelementen der übergebenen Liste hinzu.

(Geerbt von ConfigurationElement)
MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.

(Geerbt von Object)
OnDeserializeUnrecognizedAttribute(String, String)

Ruft einen Wert ab, der angibt, ob während der Deserialisierung ein unbekanntes Attribut aufgetreten ist.

(Geerbt von ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

Ruft einen Wert ab, der angibt, ob während der Deserialisierung ein unbekanntes Element aufgetreten ist.

(Geerbt von ConfigurationElement)
OnRequiredPropertyNotFound(String)

Löst eine Ausnahme aus, wenn eine erforderliche Eigenschaft nicht gefunden wird.

(Geerbt von ConfigurationElement)
PostDeserialize()

Wird nach der Deserialisierung aufgerufen.

(Geerbt von ConfigurationElement)
PreSerialize(XmlWriter)

Wird vor der Serialisierung aufgerufen.

(Geerbt von ConfigurationElement)
Reset(ConfigurationElement)

Setzt den internen Status dieses ConfigurationElement-Objekts zurück, einschließlich der Sperren und der Eigenschaftenauflistungen.

(Geerbt von ConfigurationElement)
ResetModified()

Setzt bei Implementierung in einer abgeleiteten Klasse den Wert der IsModified()-Methode auf false zurück.

(Geerbt von ConfigurationSection)
SerializeElement(XmlWriter, Boolean)

Schreibt bei Implementierung in einer abgeleiteten Klasse den Inhalt dieses Konfigurationselements in die Konfigurationsdatei.

(Geerbt von ConfigurationElement)
SerializeSection(ConfigurationElement, String, ConfigurationSaveMode)

Erstellt eine XML-Zeichenfolge mit einer nicht zusammengeführten Ansicht des ConfigurationSection-Objekts als einzelnem Abschnitt, der in einer Datei geschrieben werden soll.

(Geerbt von ConfigurationSection)
SerializeToXmlElement(XmlWriter, String)

Schreibt bei Implementierung in einer abgeleiteten Klasse die äußeren Tags dieses Konfigurationselements in die Konfigurationsdatei.

(Geerbt von ConfigurationElement)
SetPropertyValue(ConfigurationProperty, Object, Boolean)

Legt eine Eigenschaft auf den angegebenen Wert fest.

(Geerbt von ConfigurationElement)
SetReadOnly()

Legt die IsReadOnly()-Eigenschaft für das ConfigurationElement-Objekt und alle Unterelemente fest.

(Geerbt von ConfigurationElement)
ShouldSerializeElementInTargetVersion(ConfigurationElement, String, FrameworkName)

Gibt an, ob das angegebene Element serialisiert werden soll, wenn die Konfigurationsobjekthierarchie für die angegebene Zielversion des .NET Framework serialisiert wird.

(Geerbt von ConfigurationSection)
ShouldSerializePropertyInTargetVersion(ConfigurationProperty, String, FrameworkName, ConfigurationElement)

Gibt an, ob die angegebene Eigenschaft serialisiert werden soll, wenn die Konfigurationsobjekthierarchie für die angegebene Zielversion des .NET Framework serialisiert wird.

(Geerbt von ConfigurationSection)
ShouldSerializeSectionInTargetVersion(FrameworkName)

Gibt an, ob die aktuelle ConfigurationSection Instanz serialisiert werden soll, wenn die Konfigurationsobjekthierarchie für die angegebene Zielversion des .NET Framework serialisiert wird.

(Geerbt von ConfigurationSection)
ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt.

(Geerbt von Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

Ändert das ConfigurationElement-Objekt, um alle Werte zu entfernen, die nicht gespeichert werden sollen.

(Geerbt von ConfigurationElement)

Gilt für:

Weitere Informationen