Page 50 - DCAP312_WEB_TECHNOLOGIES_II
P. 50
Web Technologies-II
Notes If (! theForm.onsubmit || (theForm.onsubmit ()! = false)) {
theForm.__EVENTTARGET.value = event Target;
theForm.__EVENTARGUMENT.value = event Argument;
theForm.submit ();
}
</script>
ASP.NET generates the _doPostBack () function automatically, provided at least one control on
the page uses automatic post backs.
Any Control that has its AutoPostBack Property set to true is connected to the _doPostBack ()
function using the onclick or on change attributes. These attributes indicate what action Browser
should take in response to the Client-Side JavaScript events onclick and on change.
In other words, ASP.Net automatically changes a client-side JavaScript event into a server side
ASP.Net event, using the _doPostBack () function as an intermediary.
3.1.2 Life Cycle of a Web Page
To work with the ASP.Net Web gearstick events, we need a solid sympathetic of the web page
life rotation. The subsequent performance will be taken place when a user changes a control
that has the AutoPostBack property set to true:
1. On the client side, the JavaScript _doPostBack function is invoked, and the page is
resubmitted to the server.
2. ASP.NET re-creates the Page object using the .aspx file.
3. ASP.NET retrieves state information from the hidden view state field and updates the
controls accordingly.
4. The Page. Load event is fired.
5. The appropriate change event is fired for the control. (If more than one control has been
changed, the order of change events is undetermined.)
6. The Page.PreRender event fires and the page are rendered (transformed from a set of
objects to an HTML page).
7. Finally, the Page. Unload event is fired.
8. The new page is sent to the client.
Microsoft started development on the .NET Framework in the late 1990s
originally under the name of Next Generation Windows Services (NGWS).
By late 2000 the first beta versions of .NET 1.0 were released.
Do not set the AutoPostBack property to True. A popup control cannot work
properly if it causes postbacks.
Create a flow chart for Web page life cycle.
44 LOVELY PROFESSIONAL UNIVERSITY