Q) In what order do the events of an ASPX page execute. As a developer is it important to undertsand these events? INIT, PageLoad, Prerender , UNload.
Q) In which event are the controls fully loaded? Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that view state is not fully loaded during this event
Q) What is AutoPostBack? If you want a control to postback automatically when an event is raised, you need to set the AutoPostBackproperty of the control to True.
Q) Suppose you want an ASP.NET function (client side) executed on the MouseOver event of a button. Where do you add an event handler? The event handler is added to the Add() method of the Attributes property.
Q) How can you implement the postback property of an ASP.NET control? You need to set the AutoPostBack property to True to implement the PostBack property of controls.
Q) What are the event handlers that can be included in the Global.asax file? The Global.asax file contains some of the following important event handlers:
Q) When we execute a Web page, it passes from the following stages, which are collectively known as Web page lifecycle:
- Page request – During this stage, ASP.NET makes sure the page either parsed or compiled and a cached version of the page can be sent in response
- Start – During this stage sets the Request and Response page properties and the page check the page request is either a postback or a new request
- Page Initialization – During this stage, the page initialize and the control’s Unique Id property are set
- Load – During this stage, if the request is postback, the control properties are loaded without loading the view state and control state otherwise loads the view state
- Validation – During this stage, the controls are validated
- Postback event handling – During this stage, if the request is a postback, handles the event
- Rendering – During this stage, the page invokes the Render method to each control for return the output
- Unload – During this stage, when the page is completely rendered and sent to the client, the page is unloaded.
What’s the use of Response.Output.Write()? We can write formatted output using Response.Output.Write().
What is the difference between ExecuteScalar and ExecuteNonQuery?
Leave a Reply