Sunday, June 7, 2009

ASP.NET page directives

The ASP.NET page framework supports the following directives.

@ Page

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

@ Control

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

@ Import

Explicitly imports a namespace into a page or user control.

@ Implements

Declaratively indicates that a page or user control implements a specified .NET Framework interface.

@ Register

Associates aliases with namespaces and class names, thereby allowing user controls and custom server controls to be rendered when included in a requested page or user control.

@ Assembly

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

@ Master

Identifies an ASP.NET master page.

@ WebHandler

Identifies an ASP.NET IHttpHandler page.

@ PreviousPageType

Provides the means to get strong typing against the previous page as accessed through the PreviousPage property.

@ MasterType

Assigns a class name to the Master property of an ASP.NET page, so that the page can get strongly typed references to members of the master page.

@ OutputCache

Declaratively controls the output caching policies of a page or user control.

@ Reference

Declaratively links a page or user control to the current page or user control.

ASP.NET treats any directive block (<%@ %>) that does not contain an explicit directive name as an @ Page directive for a page, or an @ Control directive for a user control.

2 comments:

  1. Given so much information in it. its very useful .perfect explanation about Dot net framework.Thanks for your valuable information. dot net training in chennai velachery | dot net training institute in velachery

    ReplyDelete
  2. It is really a great work and the way in which u r sharing the knowledge is excellent
    Thanks for helping me to understand basic concepts. As a beginner in Dot Net programming your post help me a lot.Thanks for your informative article.. dot net training and placement in chennai | best dot net training in chennai

    ReplyDelete