ASP.NET 3.5 Framework
Session 1.2
Overview on ASP.NET frameworks Framework of ASP.NET 2.0
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
2
Framework of ASP.NET 2.0 CLR
• An agent that manage code at execution • Manage memory • Compilation • Other services
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
3
Framework of ASP.NET 2.0 Class Library
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
4
Framework of ASP.NET 3.0
Windows Communication Foundation
Windows Presentation Foundation
.NET Framework 2.0
Windows Workflow Foundation
Windows Card Space
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
5
Framework of ASP.NET 3.5
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
6
Handling Page Structure §The main purpose of page structure is to make business logic and presentation logic separate. §To make easy coding. §It creates two types of Pages for single page.
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
7
Inline Coding If not want to make business logic and presentation logic separate then it is called In line coding.
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
8
Inline Coding
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
9
New Code Behind Model
It will have two separate files. It is a best practice to use new code behind model.
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
10
Page Events What does Event Mean? Whenever you send request of your page it will raise some events in following manner,
Init
PreRender
3. PreInit
InitComplete
LoadComplete PreRenderComplete
7. PreLoad
8. SaveStateComplete
9. Load
10. Unload
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
11
Page Events Basic Page events Page_Init Called when the page is about to be initialized with its basic settings. Page_Load Called once the browser request has been processed, and all of the controls in the page have their updated values. It means that when the page has initialized its all values then it will load it to the server in this event. Page_PreRender Called once all objects have reacted to the browser request and any resulting events, but before any response has been sent to the browser. Page_UnLoad Called when the page is no longer needed by the server, and is ready to be discarded.
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
12
Page Events - Programmatically Let us create one application that will illustrate the events of page.
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
13
Page Events - Programmatically
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
14
Summary
© SHARMA WEB ACADEMY, Prepared by Kinjal Solanki
15