ASP.NET Directives


Directives specifies how an ASP .NET page is compiled. The beginning and ending of directive is marked with <%@ .... %>

Page directives are instructions, inserted at the top of an ASP.NET page, to control the behavior of the asp.net pages.

Example

<%@ 
    Page Language="C#" 
    AutoEventWireup="true" 
    CodeBehind="WebForm1.aspx.cs" 
    Inherits="WebApplication8.WebForm1" 
%>
AttributesAttributes
LanguageThe programming language for code.
AutoEventWireupThe Boolean value that enables or disables page events that are being automatically bound to methods; for example, Page_Load.
CodeBehindSpecifies the name of the compiled file that contains the class associated with the page.
InheritsThe name of the code behind or other class.

Share this article on