1. ASP.NET Introduction 2. Comp of .Net Framework 3.5 3. Sys.Req for VS 2008 4. ASP.NET Envrmnt Setup 5. VS2010 Ultimate Sys.Req 6. Installing VS 2010 7. VS 2012 Sys.Req 8. Installing VS Exp 2012 9. Start the VS 2008 10. Application Life Cycle 11. Page Life Cycle 12. Page Life Cycle Events 13. ASP.NET Example 14. Event Handling 15. Default Events 16. Server Side 17. Request Object 18. Response Object 19. Server Controls 20. Server Controls Properties 21. Server Controls Methods 22. HTML Server Controls 23. Client Side 24. ASP.NET Basic Controls 25. TextBox Control 26. CheckBox Controls 27. RadioButton Controls 28. ListBox Control 29. HyperLink Control 30. Image Control 31. BulletedList Control 32. ASP.NET Directives 33. Implements Directive 34. Master Type Directive 35. Page Directive 36. PreviousPage Type 37. Managing State 38. Control State 39. Cookies 40. Query Strings 41. Server-Side State 42. Session State 43. Validation Controls 44. Required FieldValidator 45. Range Validator 46. Compare Validator 47. RegularExpressionValidator 48. Custom Validator 49. Validation Summary 50. Data Source Control 51. AdRotator Control 52. Calendar Control 53. Calendar Control Example 54. Panel Control 55. Panel Control Example 56. Multi Views Control 57. MultiView & View controls 58. MultiView Control Example 59. FileUpload Control 60. FileUpload Control Eg 61. AJAX Control 62. UpdatePanel control 63. UpdateProgress Control 64. Custom Controls 65. Custom Control Eg 66. Personalization 67. Create Simple Profile 68. ADO.NET 69. ADO.NET Objects 70. DataTable 71. DataRow 72. DataColumn 73. Object Example 74. Error Handling 75. Tracing Errors 76. Debugger 77. Security 78. Authentication 79. Authorization 80. LINQ 81. LINQ Query Operators 82. LINQ Example 83. Caching 84. Data Caching 85. Output Caching 86. Object Caching 87. Web Services 88. Create Web Services Eg 89. Web & Machine.config 90. Settings Schema 91. ASP.NET Deployment 92. XCopy Deployment 93. Web Setup Project 94. ASP Interview Part 1 95. ASP Interview Part 2 96. ASP Interview Part 3 97. ASP Interview Part 4 98. ASP Interview Part 5 99. ASP Interview Part 6
Pr.Pg Next Pg

@ Page Directive tutorials

  • The Page directive is used to specifies the attribute and values that are associated with Web Form Pages (.aspx).

  • When the compiler complies the project the page directive send command that are basically used for compiling the page.

  • Some of the attributes of the page directive is :- Code File, Buffer, Culture, Debug, Language, Inherits.



The syntax of Page directive is.

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


  • The Page directive has many possible attributes. Some of the more common attributes of the Page directive are listed in Table below.





Makes the page an asynchronous handler (that is, it causes the page to use an implementation of IHttpAsyncHandler to process requests). The default is false.


Defines the time-out interval (in seconds) used when processing asynchronous tasks. The default is 45 seconds. The value must be an integer.


When set to true, allows the page to be executed on a single-threaded apartment (STA) thread.


Indicates whether the page's events are autowired. true if event autowiring is enabled; otherwise, false. The default is true. 


Determines whether HTTP response buffering is enabled. true if page buffering is enabled; otherwise, false. The default is true.


A string that specifies the name of the page class that will be dynamically compiled when the page is requested. 


Indicates the target user agent (typically, a Web browser such as Microsoft Internet Explorer) for which ASP.NET server controls should render content. This value can be any valid alias as defined within the <clientTarget> section of the application's configuration file


Specifies the name of the compiled file that contains the class that is associated with the page. This attribute is not used at run time.


Specifies a path to the referenced code-behind file for the page


Specifies the type name of a base class for a page and its associated code-behind class


Indicates the value of the encoding scheme used for the response. The value is an integer that serves as an ID for the encoding scheme.


Sets whether the page should be compiled, using a string that specifies one of several enumerated options. The default value is Always, so .aspx pages are compiled by default.


A string containing compiler options used to compile the page.


Defines the HTTP content type of the response as a standard MIME type


Indicates the culture setting for the page The value of this attribute must be a valid culture ID


Indicates whether the page should be compiled with debug symbols

 true if the page should be compiled with debug symbols; otherwise, false


Provides a text description of the page. This value is ignored by the ASP.NET parser.


Enables validation of events in postback and callback scenarios. true if events are being validated; otherwise, false. The default is true.



Defines session-state requirements for the page. true if session state is enabled; ReadOnly if session state can be read but not changed; otherwise, false. The default is true.


Indicates whether themes are used on the page. true if themes are used; otherwise, false. The default is true.


Indicates whether view state is maintained across page requests. true if view state is maintained; otherwise, false. The default is true.


Indicates that ASP.NET should verify message authentication codes (MAC) in the page's view state when the page is posted back from the client. true if view state should be MAC checked; otherwise,false. The default is true.


Defines a target URL for redirection if an unhandled page exception occurs


Determines whether the page is compiled using the Visual Basic Option Explicit mode. 


Defines a code-behind class for the page to inherit.This can be any class derived from the Page class. 


Specifies the language used when compiling all inline rendering (<% %> and <%= %>) and code declaration blocks within the page


Defines the locale identifier for the Web Forms page


Determines whether the runtime should generate line pragmas in the source code


Indicates whether to return the user to the same position in the client browser after postback.true if users should be returned to the same position; otherwise, false. The default is false.


Sets the path to the master page for the content page or nested master page Supports relative and absolute paths


Indicates the name of the encoding scheme used for the HTTP response that contains a page's content.


Indicates whether the page supports the smart navigation feature of Internet Explorer 5.5 or later.true if smart navigation is enabled; otherwise, false. The default is false.


Specifies a path to a source file containing code that is linked to the page


Indicates that the page should be compiled using the Visual Basic Option Strict mode. true ifOptionStrict is enabled; otherwise, false. The default is false.


Specifies a valid theme identifier to use on the page


Specifies the name of a schema that validates content on the page


Specifies a valid theme identifier to use on the page


Specifies a title for the page that is rendered within the HTML <title> tags in the response 


Indicates whether tracing is enabled.true if tracing is enabled; otherwise, false. The default is false. 


Indicates how trace messages are to be displayed for the page when tracing is enabled. Possible values are SortByTime and SortByCategory.


Indicates whether COM+ transactions are supported on the page Possible values are Disabled, NotSupported, Supported, Required, and RequiresNew. The default is Disabled.


Specifies the user interface (UI) culture setting to use for the page


Indicates whether request validation should occur


Determines how view state is encrypted, with three possible enumerated values: Auto, Always, or Never. The default is Auto, meaning that view state will be encrypted if an individual control requests it.


Indicates the compiler warning level at which you want the compiler to treat warnings as errors, thus aborting compilation of the page



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


Pr.Pg border                                              Next Pg