NamespaceInfo Class

Contains namespace references similar to the Import directive.

Syntax

class NamespaceInfo : EmbeddedObject  

Methods

This class contains no methods.

Properties

The following table lists the properties exposed by the NamespaceInfo class.

Name Description
AutoImportVBNamespace A read/write boolean value. true if the Microsoft.VisualBasic namespace is imported automatically; otherwise, false. The default is true. Note: For ASP.NET pages written by using Visual Basic, the VisualBasic namespace is imported automatically unless the AutoImportVBNamespace property is set to false.
Namespaces An array of NamespaceElement values that specify namespace references. Note: No validation is performed to verify that the namespace references are valid.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the Namespaces property of the PagesSection class.

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 enables you to import a namespace into your ASP.NET page, which makes all its classes available for use on your page.

Inheritance Hierarchy

EmbeddedObject

NamespaceInfo

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

System.Web.Configuration.NamespaceCollection
System.Web.Configuration.NamespaceInfo EmbeddedObject Class
NamespaceElement Class
PagesSection Class
Microsoft.VisualBasic Namespace