Posts

Showing posts with the label Page Directives

Page Directives in Asp.Net

Image
In this article we are reading about  “ Page Directives in Asp.Net ” . The directives are instructions that specify optional settings in Asp.Net, but they are not rendered as part of the HTML page return to the client browser. These instructions include registering a custom control, page language etc. It describes how the .aspx pages (web forms) or .ascx pages (user controls) are processed by the .Net framework. Page directive The most commonly used directive is the @ Page directive and it can be used only in Web Forms. Page directive allows you to specify many configuration options for the page. By default, Visual Studio creates a page directive as shown below: 1 2 3 4 C # & lt ;% @ Page Language = "C#"  AutoEventWireup = "true"  CodeFile = "Default.aspx.cs"  Inherits = "_Default"   %& gt ; VB . NET & lt ;% @ Page Language = "VB"  AutoEventWireup = "false"  CodeFile = "Default.aspx.vb"  I...