This documentation is archived and is not being maintained.

clear Element for namespaces for pages (ASP.NET Settings Schema)

Removes all references to inherited namespaces, allowing only the namespaces that are added by the current add element.

This element is new in the .NET Framework version 2.0.

configuration Element (General Settings Schema)
  system.web Element (ASP.NET Settings Schema)
    pages Element (ASP.NET Settings Schema)
      namespaces Element for pages (ASP.NET Settings Schema)
        clear Element for namespaces for pages (ASP.NET Settings Schema)
<clear/>

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

None.

Parent Elements

Element

Description

configuration

Specifies the required root element in every configuration file that is used by the common language runtime and the .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration settings in a configuration file and contains configuration elements that configure ASP.NET Web applications and control how the applications behave.

pages

Defines page-specific configuration settings, such as global ASP.NET directives, for pages and controls that are within the scope of the configuration file.

namespaces

Defines a collection of import directives to use during assembly precompilation.

The clear element removes all references to inherited namespaces that are stored in the namspaces element, allowing only the namespaces that are added by the current add element.

The namespaces element defines a collection of import directives to use during assembly precompilation. This element corresponds to the @ Import directive on an ASP.NET page. The @ Import directive lets you specify namespaces that are automatically imported into all the pages of an application.

Default Configuration

The following default pages element is configured in the root Web.config file in the .NET Framework version 2.0.

<pages
   <!-- Attributes -->
>
   <namespaces>
      <clear />
   </namespaces>
   <!-- Other elements -->
</pages>

Configuration section handler

PagesSection

Configuration member

Namespaces

Clear

Configurable locations

Machine.config

Root-level Web.config

Application-level Web.config

Virtual or physical directory–level Web.config

Requirements

Microsoft Internet Information Services (IIS) version 5.0, 5.1, or 6.0

The .NET Framework version 2.0

Microsoft Visual Studio 2005

Show: