ASP.NET Page Directive

Defines page-specific (.aspx file) attributes used by the ASP.NET page parser and compiler.

Syntax

<%@ Page attribute="value" [attribute="value"...] %>

Page Directive Attributes

AttributesDescription
AutoEventWireupSpecifies the page event should autowired or not.
ClassNameSpecifies the class name that will be dynamically compiled when the page is requested.
CodeFileSpecifies the code-behind class for the current page.
CodeBehindSpecifies the path to the code-behind class for the current page.
CodeFileBaseClassSpecifies the type name of a base class for a page and its associated code-behind class
CompilerOptionsSpecifies compilation options for current page.
DescriptionSpecifies a text description of the master page.
DebugSpecifies page should be compiled with debug symbols.
LanguageSpecifies language being used when compiling inline code blocks.
InheritsSpecifies the base class for the page to inherit.
SrcSpecifies the source file that contains the implementation of the base class specified with Inherits.
MasterPageFileSpecifies the master page for the current page.
EnableSessionStateSpecifies the page should treat session data (true, false, readonly).
EnableViewStateSpecifies whether the page view state is maintained across page requests.
EnableThemingSpecifies the page will support themes for embedded controls.
ErrorPageSpecifies the error page URL to unhandled page exceptions.
ValidateRequestSpecifies whether the page request validation should occur.
CodePageSpecifies the code page value for the response.
ContentTypeSpecifies the HTTP content type of the page response.
TitleSpecifies the title of the page.
ResponseEncodingSpecifies the character encoding of the page.
BufferSpecifies HTTP response buffer of the page.

Example C#

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="homePage.aspx.cs" 
Inherits="homePage" %>




Example VB

<%@ Page Language="VB" AutoEventWireup="true" CodeFile="homePage.aspx.vb" 
Inherits="homePage" %>




More ASP.NET Directives

 
 
SHARE THIS IF YOU LIKE!
submit to reddit

SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.