ASP .
NET Web Form
Model of ASP .Net
a) Page state
b) session state
Button Save(click)
public void save()
{
logic of save functionality
10
this method is calling from two places
public void getStudentDetails(student Id)
{
int studentId= Convert.ToInt32(PageSate["studentid"]);
Db call
List studentInfofrmaltion= GetStudentById(studentId);
bind on table
GridViewStudent= dataSource(dt);
GridViewStudent.Bind();
2. session State
ASP .Net
global.asax
Application_Start()
{
--- Session start
}
Application_End()
{
-- session End
Session.Abondon()
Component of .Net
a)CLR(Common Language Runtime)
b) common Framework class Library
c) Common Type Specification
d) Common Type System
e) Metadata and assembly
f) Windows form
g) ASp .Net and Asp .Net AJAX
h) ADO .NEt(database operation)
operation of Ado
i) Insert
ii)update
iii) delete
iv) select
i) windows Workflow Foundation(WF)
j) Windows communication Foundation(WCF)
web services(automatic) run
K) Linq(Language Integrated Query)
features
Secure()
a) hardcoded query
b) stored procedure
input parameter
output paramater
c) function
only input paramater
without return type
Get Data from Database
Searching
sorting
grouping
avg
max
min
Life cycle of ASP .NET
1. Initialization
2. instance of control value
3. restoration and maintenance state
4. execution of event handler
5. page rendering
Event Handling
private void Butto1_Click(object sender,Event e)
{
Page and control Event
1) Data binding (grid view, list view, Repeater)
2) Dispose (variable, List)
3) Error(page)
[ErrorFilter]
public classname
{
Middileware
global.asax class Register
4). Init(initilization) int, float, List, gridview, textbox
5) Load(while application start)
6) Pre Render(Pre Render) calling just before converting ASP .net server control to
html control
7) unload()
8. Button Click Event(Manual)