NamespaceCollection Class
.NET Framework 2.0
Contains a collection of namespace objects. This class cannot be inherited.
Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The NamespaceCollection contains NamespaceInfo objects. Each NamespaceInfo object is the same as an Import (<%@ Import %>) directive that applies to all pages and controls in the scope of the configuration file. The Import directive allows you to import a namespace into your ASP.NET page, making all its classes available for use on your page.
The following configuration file excerpt shows how to declaratively specify values for several properties of the NamespaceCollection class.
<system.web>
<pages>
<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>
</pages>
</system.web>
The following code example shows how to use the NamespaceCollection type. This code example is part of a larger example provided for the PagesSection class.
System.Object
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationElementCollection
System.Web.Configuration.NamespaceCollection
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationElementCollection
System.Web.Configuration.NamespaceCollection
Community Additions
ADD
Show: