PagesSection Classe

Définition

Fournit un accès programmatique à la section pages du fichier de configuration. Cette classe ne peut pas être héritée.

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
Héritage

Exemples

Cet exemple montre comment spécifier des valeurs de manière déclarative pour plusieurs attributs de la pages section, qui sont également accessibles en tant que membres de la PagesSection classe.

L’exemple de fichier de configuration suivant montre comment spécifier des valeurs de manière déclarative pour la section pages .

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

L’exemple de code suivant montre comment utiliser la PagesSection classe.

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

Remarques

La PagesSection classe fournit un moyen d’accéder par programmation et de modifier le contenu de la section pages de fichiers de configuration. Cette section de configuration prend en charge la définition de certaines directives de ASP.NET page et de contrôle globalement pour toutes les pages et contrôles dans l’étendue du fichier de configuration. Cela inclut la directive, la @ Page @ Import directive via la Namespaces propriété de collection et la @ Register directive via la Controls propriété de collection. Il prend également en charge le mappage des types d’étiquettes à d’autres types de balises au moment de l’exécution via la TagMapping propriété de collection.

Les directives spécifient les paramètres utilisés par les compilateurs de page et de contrôle utilisateur lorsqu’ils traitent ASP.NET Web Forms fichiers de page (.aspx) et de contrôle utilisateur (.ascx).

Constructeurs

PagesSection()

Initialise une nouvelle instance de la classe PagesSection en utilisant les paramètres par défaut.

Propriétés

AsyncTimeout

Obtient ou définit une valeur qui indique la durée d'attente en secondes avant qu'un gestionnaire asynchrone se termine pendant le traitement de page asynchrone.

AutoEventWireup

Obtient ou définit une valeur qui indique si les événements pour les pages ASP.NET sont connectés automatiquement aux fonctions de gestion des événements.

Buffer

Obtient ou définit une valeur qui spécifie si les pages .aspx et les contrôles .ascx utilisent une mise en mémoire tampon des réponses.

ClientIDMode

Obtient ou définit l'algorithme par défaut utilisé pour générer l'identificateur d'un contrôle.

CompilationMode

Obtient ou définit une valeur qui détermine comment les pages .aspx et contrôles .ascx sont compilés.

ControlRenderingCompatibilityVersion

Obtient ou définit une valeur qui spécifie la version ASP.NET avec laquelle tout HTML restitué sera compatible.

Controls

Obtient une collection d'objets TagPrefixInfo.

CurrentConfiguration

Obtient une référence à l'instance Configuration de niveau supérieur qui représente la hiérarchie de configuration à laquelle l'instance ConfigurationElement actuelle appartient.

(Hérité de ConfigurationElement)
ElementInformation

Obtient un objet ElementInformation qui contient les fonctionnalités et informations non personnalisables de l'objet ConfigurationElement.

(Hérité de ConfigurationElement)
ElementProperty

Obtient l'objet ConfigurationElementProperty qui représente l'objet ConfigurationElement lui-même.

(Hérité de ConfigurationElement)
EnableEventValidation

Obtient ou définit une valeur qui indique si la validation d'événement est activée.

EnableSessionState

Obtient ou définit une valeur qui spécifie si l'état de session est activé, désactivé ou en lecture seule.

EnableViewState

Obtient ou définit une valeur indiquant si l'état d'affichage est activé ou désactivé.

EnableViewStateMac

Obtient ou définit une valeur qui spécifie si ASP.NET doit exécuter un code d'authentification de message (MAC) sur l'état d'affichage de la page lorsque la page est publiée à partir du client.

EvaluationContext

Obtient l'objet ContextInformation pour l'objet ConfigurationElement.

(Hérité de ConfigurationElement)
HasContext

Obtient une valeur qui indique si la propriété CurrentConfiguration a la valeur null.

(Hérité de ConfigurationElement)
IgnoreDeviceFilters

Obtient la collection des balises de périphériques qu'ASP.NET doit ignorer lorsqu'il restitue une page.

Item[ConfigurationProperty]

Obtient ou définit une propriété ou un attribut de cet élément de configuration.

(Hérité de ConfigurationElement)
Item[String]

Obtient ou définit une propriété, un attribut ou un élément enfant de cet élément de configuration.

(Hérité de ConfigurationElement)
LockAllAttributesExcept

Obtient la collection d'attributs verrouillés.

(Hérité de ConfigurationElement)
LockAllElementsExcept

Obtient la collection d'éléments verrouillés.

(Hérité de ConfigurationElement)
LockAttributes

Obtient la collection d'attributs verrouillés.

(Hérité de ConfigurationElement)
LockElements

Obtient la collection d'éléments verrouillés.

(Hérité de ConfigurationElement)
LockItem

Obtient ou définit une valeur indiquant si l'élément est verrouillé.

(Hérité de ConfigurationElement)
MaintainScrollPositionOnPostBack

Obtient ou définit une valeur qui indique si la position de défilement de la page doit être maintenue lorsqu'elle est retournée par une publication (postback) à partir du serveur.

MasterPageFile

Obtient ou définit une référence à la page maître pour l'application.

MaxPageStateFieldLength

Obtient ou définit le nombre maximal de caractères qu'un seul champ d'état d'affichage peut contenir.

Namespaces

Obtient une collection d'objets NamespaceInfo.

PageBaseType

Obtient ou définit une valeur qui spécifie une classe code-behind dont les pages .aspx héritent par défaut.

PageParserFilterType

Obtient ou définit une valeur qui spécifie le type de filtre de l'analyseur.

Properties

Obtient la collection de propriétés.

(Hérité de ConfigurationElement)
RenderAllHiddenFieldsAtTopOfForm

Obtient ou définit une valeur qui indique si tous les champs masqués générés par le système sont rendus en haut du formulaire.

SectionInformation

Obtient un objet SectionInformation qui contient les fonctionnalités et informations non personnalisables de l'objet ConfigurationSection.

(Hérité de ConfigurationSection)
SmartNavigation

Obtient ou définit une valeur indiquant si la navigation intelligente est activée.

StyleSheetTheme

Obtient ou définit le nom du thème d'une feuille de style ASP.NET.

TagMapping

Obtient une collection d'objets TagMapInfo.

Theme

Obtient ou définit le nom d'un thème de page ASP.NET.

UserControlBaseType

Obtient ou définit une valeur qui spécifie une classe code-behind dont les contrôles utilisateur héritent par défaut.

ValidateRequest

Obtient ou définit une valeur qui détermine si ASP.NET examine les entrées de valeurs dangereuses à partir du navigateur. Pour plus d’informations, consultez Vue d’ensemble des attaques de script.

ViewStateEncryptionMode

Obtient ou définit le mode de chiffrement qu'ASP.NET utilise lors du maintien des valeurs ViewState.

Méthodes

DeserializeElement(XmlReader, Boolean)

Lit du XML à partir du fichier de configuration.

(Hérité de ConfigurationElement)
DeserializeSection(XmlReader)

Lit du XML à partir du fichier de configuration.

(Hérité de ConfigurationSection)
Equals(Object)

Compare l’instance de ConfigurationElement actuelle à l’objet spécifié.

(Hérité de ConfigurationElement)
GetHashCode()

Obtient une valeur unique représentant l'instance actuelle de ConfigurationElement.

(Hérité de ConfigurationElement)
GetRuntimeObject()

Retourne un objet personnalisé en cas de substitution dans une classe dérivée.

(Hérité de ConfigurationSection)
GetTransformedAssemblyString(String)

Retourne la version transformée du nom de l'assembly spécifié.

(Hérité de ConfigurationElement)
GetTransformedTypeString(String)

Retourne la version transformée du nom de type spécifié.

(Hérité de ConfigurationElement)
GetType()

Obtient le Type de l'instance actuelle.

(Hérité de Object)
Init()

Rétablit l’état initial de l’objet ConfigurationElement.

(Hérité de ConfigurationElement)
InitializeDefault()

Utilisé pour initialiser un jeu de valeurs par défaut pour l'objet ConfigurationElement.

(Hérité de ConfigurationElement)
IsModified()

Indique si cet élément de configuration a été modifié depuis son dernier enregistrement ou chargement lorsqu'il est implémenté dans une classe dérivée.

(Hérité de ConfigurationSection)
IsReadOnly()

Obtient une valeur indiquant si l’objet ConfigurationElement est en lecture seule.

(Hérité de ConfigurationElement)
ListErrors(IList)

Ajoute les erreurs de propriété non valide dans cet objet ConfigurationElement et dans tous les sous-éléments à la liste passée.

(Hérité de ConfigurationElement)
MemberwiseClone()

Crée une copie superficielle du Object actuel.

(Hérité de Object)
OnDeserializeUnrecognizedAttribute(String, String)

Obtient une valeur indiquant si un attribut inconnu est rencontré pendant la désérialisation.

(Hérité de ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

Obtient une valeur indiquant si un élément inconnu est rencontré pendant la désérialisation.

(Hérité de ConfigurationElement)
OnRequiredPropertyNotFound(String)

Lève une exception lorsqu'une propriété requise est introuvable.

(Hérité de ConfigurationElement)
PostDeserialize()

Appelé après la désérialisation.

(Hérité de ConfigurationElement)
PreSerialize(XmlWriter)

Appelé avant la sérialisation.

(Hérité de ConfigurationElement)
Reset(ConfigurationElement)

Rétablit l'état interne de l'objet ConfigurationElement, y compris les verrouillages et les collections de propriétés.

(Hérité de ConfigurationElement)
ResetModified()

Réinitialise la valeur de la méthode IsModified() à false en cas d’implémentation dans une classe dérivée.

(Hérité de ConfigurationSection)
SerializeElement(XmlWriter, Boolean)

Écrit le contenu de cet élément de configuration dans le fichier de configuration lorsqu'il est implémenté dans une classe dérivée.

(Hérité de ConfigurationElement)
SerializeSection(ConfigurationElement, String, ConfigurationSaveMode)

Crée une chaîne XML contenant un affichage non fusionné de l'objet ConfigurationSection sous la forme d'une section unique à écrire dans un fichier.

(Hérité de ConfigurationSection)
SerializeToXmlElement(XmlWriter, String)

Écrit les balises extérieures de cet élément de configuration dans le fichier de configuration lorsqu'il est implémenté dans une classe dérivée.

(Hérité de ConfigurationElement)
SetPropertyValue(ConfigurationProperty, Object, Boolean)

Affecte la valeur spécifiée à une propriété.

(Hérité de ConfigurationElement)
SetReadOnly()

Définit la propriété IsReadOnly() pour l'objet ConfigurationElement et tous les sous-éléments.

(Hérité de ConfigurationElement)
ShouldSerializeElementInTargetVersion(ConfigurationElement, String, FrameworkName)

Indique si l’élément spécifié doit être sérialisé lorsque la hiérarchie d’objets de configuration est sérialisée pour la version cible spécifiée du .NET Framework.

(Hérité de ConfigurationSection)
ShouldSerializePropertyInTargetVersion(ConfigurationProperty, String, FrameworkName, ConfigurationElement)

Indique si la propriété spécifiée doit être sérialisée lorsque la hiérarchie d’objets de configuration est sérialisée pour la version cible spécifiée du .NET Framework.

(Hérité de ConfigurationSection)
ShouldSerializeSectionInTargetVersion(FrameworkName)

Indique si l’instance actuelle ConfigurationSection doit être sérialisée lorsque la hiérarchie d’objets de configuration est sérialisée pour la version cible spécifiée du .NET Framework.

(Hérité de ConfigurationSection)
ToString()

Retourne une chaîne qui représente l'objet actuel.

(Hérité de Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

Modifie l'objet ConfigurationElement pour supprimer toutes les valeurs qui ne doivent pas être enregistrées.

(Hérité de ConfigurationElement)

S’applique à

Voir aussi