manzoor ahmad mubashir muhamad yousaf shahzad gul€¦ · postback a postback occurs when a page...

11
Active Server Pages (ASP.NET) Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul Presented By

Upload: others

Post on 18-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Active Server Pages (ASP.NET)

Manzoor Ahmad MubashirMuhamad Yousaf

Shahzad Gul

Presented By

Page 2: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Agenda• ASP.NET page life cycle

• View state• Postback• Rendering

• Data Binding• State Management• Website Deployment

Page 3: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

ASP.NET Page lifecycle

ASP.NET page life cycle starts with a call toProcessRequest()

These steps include managing view state, handlingpostback events, and rendering the page's HTMLmarkup

Page 4: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

View state A The load view state stage only happens when the

page has been posted back During this stage, the view state data that had been

saved from the previous page visit is loaded andrecursively populated into the control hierarchy ofthe Page

Page 5: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Postback A postback occurs when a page generates an

HTML form whose values are posted backto the same page

Since HTTP is stateless and therefore ASP.NET usesa hidden form fields to handle a client side event onserver side.

In ASP.NET each page is handled as a separateentity that have ability to process its own data.

Page 6: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Render In the render stage the HTML that is emitted to the

client requesting the page is generated.The Page class accomplishes this by recursivelyinvoking the RenderControl() method of each of thecontrols in its hierarchy.

Page 7: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Demo

Page 8: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Data Binding What is Data Binding?

Populating controls with Data Data binding is the process that establishes a

connection between the application UI and businesslogic

Page 9: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Deployment

X-copy Copy website

Page 10: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Demo

Page 11: Manzoor Ahmad Mubashir Muhamad Yousaf Shahzad Gul€¦ · Postback A postback occurs when a page generates an HTML form whose values are posted back to the same page Since HTTP is

Resources www.nseecs.edu.pk/~mujtaba/lectures/Lec_7(ASPnet%20Intro).ppt http://msdn.microsoft.com/en-us/library/ms972976.aspx