Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 5

Page Life Cycle Events

Page_Init
This is fired when the page is initialized
Page_Load
This is fired when the page is loaded
The difference between Page_Init and Page_load is that
the controls are guaranteed to be fully loaded in the
Page_load.The controls are accessible in the Page_Init
event,but the ViewState is not loaded,so controls will have
their default values,rather than any values set during the
postback.
Control_Event
This is fried if a control triggered the page to be
reloaded (such as a button)
Page_unload
This is fired when the page is unloaded from the
memory
Types of Controls in
ASP.Net
HTML SERVER
SYNTAX
<INPUT TYPE=TEXT RUNAT=SERVER>

WEBSERVER CONTROLS
Web Server Controls
Standard List Validatio Data Misc
Controls Controls n bound Controls
label  Radio Controls
Button List
Controls
Textbox Required Crystal
 Check Data Grid
Button field Report
Box List Validator Data List
Link Viewer
Dropdown Repeater control
Button Range
List Validator
Image List Box
Button Compare
Calendar Validator
AdRotator Regular
Expression
Panel
Validator
Place
Custom
Holder
Validator
Table
Validation
Literal Summary
Control
Radio
Common Syntax for any web
server control

<asp:controltype id=“name of the


control” runat=“server”
----------------
----------------
//additional properties
></asp:controltype>
To close syntax is “ / “ .
In order to set or get the value from any
standard control text property should be
used.
Eg:
<asp:label id=“lb1” runat=“server”
text=“user name”></asp:label>
<asp:button id=“lb1” runat=“server”
text=“Login” />

You might also like