Share via


Application Directives 

Application directives specify optional application-specific settings used by the ASP.NET parser when processing ASP.NET global application (.asax) files. Application directives are located at the top of the Global.asax file.

<%@ directive attribute=value [attribute=value … ]%>

Remarks

Each directive can contain one or more attribute/value pairs specific to that directive. The following table shows the application directives supported in ASP.NET. Note that the @ Application directive can be used only in Global.asax files, while the other directives are used in other ASP.NET files such as Web pages (.aspx files) and user controls (.ascx files).

@ Application - Global.asax

Defines application-specific attributes used by the ASP.NET application compiler.

@ Import

Explicitly imports a namespace into an application.

@ Assembly

Links an assembly to the application at parse time.

See Also

Other Resources

Global.asax Syntax