What is ASP.NET - Directives And The Import Directive

What is ASP.NET - Directives And The Import Directive:

ASP.NET directives are instructions to specify optional settings, such as registering a custom control and page language. These settings describe how the web forms (.aspx) or user controls (.ascx) pages are processed by the .Net framework.

The syntax for declaring a directive is:

<%@  directive_name attribute=value  [attribute=value]  %>
In this section, we will just introduce the ASP.NET directives and we will use most of these directives throughout the tutorials.

The Import Directive

The Import directive imports a namespace into a web page, user control page of application. If the Import directive is specified in the global.asax file, then it is applied to the entire application. If it is in a page of user control page, then it is applied to that page or control.

The basic syntax for import directive is:

<%@ namespace="System.Drawing" %>


Some Others Are 

IMPORT DIRECTIVE

MASTER DIRECTIVE

MASTERTYPE DIRECTIVE

OUTPUTCACHE DIRECTIVE

PAGE DIRECTIVE

PREVIOUSPAGETYPE DIRECTIVE

REFERENCE DIRECTIVE

REGISTER DIRECTIVE

Comments

Popular posts from this blog