Structure
of Asp.net page:-
A typical Asp.net Page comprises of
following components.
1. Directives
2. Code Declaration
Block
3. Code
Rendering Block
4. Server side
Comments
5. Server side
controls
6. HTML
Controls
7. User Controls
8. Server side
Includes
9. Literal
Text
10. XML
Comments
Directives:-
The Directives
define the application type and provide set of attributes that control the behavior
of application the comment used directives in Asp.net are
·
@Page
·
@Application
·
@Controls
·
@Imports
·
@Master
·
@Output cache
·
@Register
·
@Security etc….
@Page:-
The Page directive
is used for Asp.net Web forms it provides a set of attributes. That are used to
Control the behavior of a web form.
Attributes:-
1. Language:-
Indicate
the language that web form must be use.Aps.net web form can use two languages
VB and C#.
Syntax
:- <%@Page Language=”C#”%>
2. Code file:-
Indicate
the Code file name if you are using code
behind document.
Syntax
:- <%@Page
Language=”C#” code file=”home.aspx.cs”%>
3. Inherits;-
Indicate the Class name that web form
as to implement.
4. Auto Event
wire Up:-
It wires up the event for Controls
with the code file when set to true
5. Culture:-
It set the page culture to specific
localization so that the page elements Response to the culture.
Syntax :- <%@Page Language=”C#” culture=”en-IN”% >