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
Controls Controls
label
Textbox
Button
Link
Button
Image
Button
Calendar
AdRotator
Panel
Place
Holder
Table
Literal
Control

Radio
Button List
Check
Box List
Dropdown
List
List Box

Validatio
n
Controls

Data
Misc
bound
Controls
Controls

Required
field
Validator
Range
Validator
Compare
Validator
Regular
Expression
Validator
Custom
Validator
Validation
Summary

Data Grid
Data List
Repeater

Crystal
Report
Viewer
control

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