Import Directive in ASP.Net

The @Import directive allows you to specify any namespaces to the imported to the Asp.Net pages or user controls. By importing, all the classes and interfaces of the namespace are made available to the page or user control. The example of the @Import directive

@ Import

<%@ Import namespace="value" %>

namespace:
The fully qualified name of the namespace to import. This can include any of the namespaces included in the .NET Framework or a custom namespace.

<%@ Import namespace=”System.Data” %>
<%@ Import namespace=”System.Data.SqlClient” %>
Tags: , , , , , ,
Hot on Web:

About author