Thursday, January 15, 2009

Directives for Asp.Net Web Pages

Directives
---------------
Directives are used to specify the settings used by the page or usercontrol compilers to process pages or usercontrol files

There are 11 types of directives
1.@Page: This is used to define page specific attributes. It is used only in .aspx files
2.@Control: This is used to define Control specific attributes. It is used only in .ascx files
3.@Master: This is used to define masterpage specific attribute. It is used only in .master files
4.@Import: This is used to import a namespace in to the current page or usercontrol
5.@Register: This is used to render usercontrols and custom server controls in to a current page or usercontrol
6.@Assembly: This is used to link an assembly in to the current page or usercontrol.
7.@Reference: This is used to link a page or usercontrol in to current page or usercontrol
8.@Implements: This is used to implement a specific .Net framework Interface in to current page or usercontrol
9.@Outputcache: This is used to apply cache techniques in to the current page or usercontrol
10.@MasterType: This defines a class or virtual path used to type the master property of a page
11.@Previouspagetype: This is used to create a strongly typed reference to the source page from the target of a cross page posting.

No comments:

Post a Comment