90 likes | 105 Views
What is ASP.NET?<br>ASP.NET is a web development Programming language that provides a programming model, a comprehensive software infrastructure and various services to build robust web applications for PC and mobile devices.
E N D
What is ASP.NET? ASP.NET is a web development Programming language that provides a programming model, a comprehensive software infrastructure and various services to build robust web applications for PC and mobile devices. ASP.NET works on top of the HTTP Protocol and uses the HTTP commands and policies to set a Browser-to-server bilateral communication and cooperation. ASP.NET is a part of the Microsoft. Net Platform. ASP.NET applications are compiled codes written using the extensible and reusable components or objects in.Net framework. These codes can be the entire hierarchy of classes in. Use the. Net framework.
What is an event in .net? An event is an action or event such as a mouse click, key press, mouse movement, or system-generated notification. A process communicates through events. For example, interrupts are system-generated events. When events occur, the application should be able to respond and manage them. Events in ASP.NET on the client machine and handled on the server machine. For example, a user clicks a button in the browser. A click event is triggered. The server has a subroutine that describes what to do when the event is dispatched. If the event message is transmitted to the server, it checks whether the Click event has an associated event handler. If this is the case, the event handler is executed.
Event Handling With Controls All ASP.NET controls are implemented as classes, and you have events that are triggered when a user performs a specific action.There are built-in attributes and event handlers for handling events. Event handler is encoded to respond to an event and take appropriate action. By default, Visual Studio creates an event handler by containing a Handles clause for the sub procedure. This clause names the control and the event that handles the procedure.
The following are the life cycle events page for .Net PreInit-PreInit is the first event in the page life cycle. It checks the property for determines whether the page is a postback. It is the themes and master pages, creates dynamic controls, and gets and sets profile property values. Init-init event initializes the control property and creates the control tree. InitComplete-initcomplete event allows you to track View Status. All controls turn on view state tracking. LoadViewState-LoadViewState event allows you to load view status information into the controls
LoadPostData - at this stage the contents of all input fields are processed with the <form> tag. PreLoad-PreLoad occurs before the post back data is loaded in the controls. This event can be handled by Page_PreLoad handler. Load - the Load event is triggered first for the page and then recursively for all child controls. The controls in the control tree are created. This event can be handled by overloading The OnLoad method or creating a Page_Load handler. Discharge-the discharge phase is the final phase of the side life cycle. It dispatches the UnLoad event for all controls recursively and last for the page itself. The final cleanup is done and all resources and references, such as database connections, are released. This event can be handled by Page_UnLoad handler.