What are .Net directives?

By | September 18, 2017

@ Assembly:-Links an assembly to the current page or user control decoratively.

@ Control:-Defines control-specific attributes used by the ASP.NET page parser and compiler and can be included only in .ascx files (user controls).

@ Implements:-Indicates that a page or user control implements a specified .NET Framework interface decoratively.

@ Import:-Imports a name space into a page or user control explicitly.

@ Master:-Identifies a page as a master page and defines attributes used by the ASP.NET page parser and compiler and can be included only in .master files.

@ Master Type:-Defines the class or virtual path used to type the Master property of a page.

@ Output Cache:-Controls the output caching policies of a page or user control decoratively.

@ Page:-Defines page-specific attributes used by the ASP.NET page parser and compiler and can be included only in .aspx files.

@ Previous:-Creates a strongly typed reference to the source page from the target of a cross-page posting.

@ Reference:-Links a page, user control, or COM control to the current page or user control declarative.

@ Register:-Associates aliases with name spaces and classes, which allow user controls and custom server controls to be rendered when included in a requested page or user control.

Leave a Reply

Your email address will not be published. Required fields are marked *