Explain different types of directives in .NET [Resolved]

Posted by Shweta_Pinky under ASP.NET on 6/29/2013 | Points: 10 | Views : 2165 | Status : [Member] | Replies : 1
Please tell me about different types of directives in .NET




Responses

Posted by: aswinialuri-19361 on: 6/30/2013 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi Shweta,
11 types of directives are there .
But most common directive is @page directive
1)@Page:Defines page-specific attributes used by the ASP.NET page parser and compiler and can be included only in .aspx files.

2)@Assembly:Links an assembly to the current page or user control declaratively

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


4)@Outputcache:Controls the output caching policies of a page or user control declaratively.


5)@Reference: Links a page, user control, or COM control to the current page or user control declaratively.


6)@Implements: Indicates that a page or user control implements a specified .NET Framework interface declaratively.


7)@Import: Imports a namespace into a page or user control explicitly.


8)@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.


9)@MasterType: Defines the class or virtual path used to type the Master property of a page.


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

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



Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Shweta_Pinky, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response