The @ Import directive explicitly imports a namespace into a page, making all classes and interfaces of the imported namespace available to the page. The imported namespace can be either part of the NGWS base class libraries or a user-defined namespace.
<%@ Import namespace="value" %>
Attributes
Remarks
The @ Import
directive cannot have more than one namespace
attribute. To import multiple namespaces, use multiple @ Import
directives.
The following namespaces are automatically imported into all pages:
Example
The following code fragment imports the NGWS base class namespace System.Net
and the user-defined namespace Grocery
:
<%@ Import Namespace="System.Net" %> <%@ Import Namespace="Grocery" %>
See Also
ASP+ Page Syntax | Directives