Export (0) Print
Expand All

@ Import — Global.asax

.NET Framework 1.1

Explicitly imports a namespace into an application, making all classes and interfaces of the imported namespace available to the application. The syntax for the @ Import directive is as follows.

<%@ Import namespace="value" %>

Attributes

namespace
The name of the namespace to import to the application. This can be any of the namespaces included in the .NET Framework or a custom namespace.

Remarks

You must use a single @ Import directive for each namespace you want to import.

Example

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

See Also

Global.asax Syntax | Application Directives

Show:
© 2014 Microsoft