Explicitly imports a namespace into an application, making all classes and interfaces of the imported namespace available to the application.
<%@ Import attribute=value [attribute=value … ]%>
The following attribute/value pairs are supported:
Attribute | Supported Values | Description |
---|---|---|
Namespace | Any valid namespace | Namespace to import. |
Assembly | Any valid assembly | Assembly to link into compiled project. |
In addition to configuring assembly references/namespace imports at the application level, ASP+ also allows developers to specify them at the page level.
The following code uses @ Import
directives to import the System.IO and System.Collections namespaces for use throughout an application.
<%@ Import Namespace=”System.IO” %> <%@ Import Namespace=”System.Collections” %>
ASP+ Application File Syntax | Application Directives