Different Types of Directives in Dot Net


by Adam Sturo - Date: 2007-08-08 - Word Count: 209 Share This!

@Page directive:

Defines page-specific attributes used by the ASP.NET page parser and compiler. Can be included only in .aspx files and also define the page language used just like c#,VB etc.

@Control: Defines control-specific attributes used by the ASP.NET page parser and compiler. Can be included only in .ascx files.This directive also define the view state of page.

@Import: Explicitly imports a namespace into a page or user control. The Import directive cannot have more than one namespace attribute. To import multiple namespaces, use multiple @Import directives.Its helps in importing of files.

@Implements: Indicates that the current page or user control implements the specified .NET framework interface .

@Register:

Associates aliases with namespaces and class names for concise notation in custom server control syntax.We can register the user control also with the help of Register directive.

@Assembly: Links an assembly to the current page during compilation, making all the assembly's classes and interfaces available for use on the page.

@OutputCache: Declaratively controls the output caching policies of an ASP.NET page or a user control contained in a page

@Reference: Declaratively indicates that another user control or page source file should be dynamically compiled and linked against the page in which this directive is declared.

To learn about Web Services Interview Questions visit dotnetquestion.info


Related Tags: dot net questions, web services, sql server interview questions, xml interview questions

Know more about Dot Net Interview Questions and Sql Server Interview Questions

Your Article Search Directory : Find in Articles

© The article above is copyrighted by it's author. You're allowed to distribute this work according to the Creative Commons Attribution-NoDerivs license.
 

Recent articles in this category:



Most viewed articles in this category: