Sunday, October 9, 2016

ASP.NET Page Life Cycle

  • Asp.net programs is run in specific life cycle.It follows the step-by-step procedure.
  • Asp.net page life cycle gives the full details of program execution it will help in writing the program.
  • Whenever we are going to process customised control then that time you need to know the all the details like where we need to initialise the custom control and where you need to create the instance for custom control.

ASP.NET Page Life Cycle Phases/Stages :

  • ASP.NET page life cycle phases are following :
    • Page Request.
    • Start.
    • Initialisation.
    • Load.
    • Postback Event Handling.
    • Rendering.
    • Unload.

Page Request :

  • Page request is done before the page requesting.
  • While Page requesting only the asp.net decides the page needs to be parsed and compiled or cached version of the page sent as response with out running the page.

Start :

  • Start page will decide the request and response.
  • It also decides the page request is new request or postback request(old request) and then sets the 'IsPostBack' property.

Initialisation :

  • In Initialisation phase, all properties and unique id are set to the controls.
  • Master page and themes also applicable to the  page.

Load :

  • During the load, If current request is postback then, all properties are loaded with the information recovered from the viewstate and control state.

Postback Event Handling :

  • Postback is raised whenever the control event handlers are raised.
  • After postback, Validating the controls will happen if any control have the validation.

Rendering :

  • Before rendering the page,asp engine will process and result will generate.That generated result format will not the understand by the browser/client.
  • So, we need to render the page to the user(browser) understandable format.

Unload :

  • After sending the result to client, asp engine will unload processed page from the memory.

ASP.NET Page Life Cycle Events :

  • Asp.net page life cycle,each and every phase contains the events.Those events will used to handle the code.For control the events ,we will bind the event handlers with the relevant event, that will help to run the code.
  • Following are the page life cycle events :
    • PreInit.
    • Init.
    • InitComplete.
    • Preload.
    • Load.
    • LoadComplete.
    • PreRender.
    • Render.
    • RenderComplete.
    • SaveStatecomplete.
    • Unload.

PreInit :

  • PreInit raised after the start phase complete only.
  • In preInit , we will check the details like the page request is new request or postback request.
  • In this event we will create the dynamic controls and dynamically apply themes to the page.

  Init :

  • This event is used to read or initialising the properties.
  • Raised after loading the all the properties if the controls are loaded.
    

InitComplete :

  • Only one function will raise between the Init and InitComplete that is enabling the viewstate.

PreLoad :

  • Raised after the page loads view state for itself and all controls, and after it processes postback data that is included with the Request instance.
  • Before the Page instance raises this event, it loads view state for itself and all controls, and then processes any postback data included with the Request instance.
  • Loads ViewState: ViewState data are loaded to controls.
  • Loads Postback data: Postback data are now handed to the page controls.

Load :

  • the page has been restored to its previous state in case of postbacks.
  • Code inside the page load event typically checks for PostBack and then sets control properties appropriately. 

LoadComplete:

  • Raised at the end of the event-handling stage.
  • Use this event for tasks that require that all other controls on the page be loaded.

PreRender :

  • PreRender will raise after loading the object and that object is required to render the page.

Render :

  • This is not an event; instead, at this stage of processing, the Page object calls this method on each control. All ASP.NET Web server controls have a Render method that writes out the control's markup to send to the browser.

SaveStateComplete :

  • Raised after view state and control state have been saved for the page and for all controls. 
  • Any changes to the page or controls at this point affect rendering, but the changes will not be retrieved on the next postback.

UnLoad :

  • Unload event will raise for each and every event.
  • The page itself raise this event to cleanup the files from the server memory.for example, closing the opened files. 

Tuesday, October 4, 2016

Microsoft Excel Sheet

  • Microsoft Excel is the software application developed by the Microsoft corporation for windows.
  • Microsoft Excel is used for storing the data in the tabular format,graphical format,etc.
  • Microsoft Excel was released in the year of the 1985,September 30.

Why we need Microsoft Excel ?

  • If we don't have Excel software, we need to enter the data in another documents like notepad.It will not looking good and also it's hard to calculate the arithmetic operations.
  • Microsoft Excel will arrange the data in understandable format and looking good.
  • Microsoft Excel can provides options to show the data in graphical view like graphs,charts,etc.
  • Microsoft Excel provides the support to perform the arithmetic operations on selected data of the spreadsheet.

Explanation about the Ms Excel :

  • Microsoft Excel sheet provides the ribbon(menu bar) which is used to apply the styles on spreadsheet.
  • Ribbon contains the Home,Insert,Page layout,Formulas,Data,Review,View,Developer and Team options as menu.




Advantages of the Microsoft Excel Sheet :

  • MS-Excel provides keyboard shortcuts for working on Excel sheet easily.
  • It also provides the the data validation for selected cell of the sheet.


  • It provides the sharing of data to other applications and supports for printing and also provides the option to convert int the PDF format.


  • It provides the date functions(year,month), logical function(if,and,or) and text functions(find,substr,left,right,mid),etc.
  • We can perform the arithmetic operations on selected cells of Excel sheet like addition,subtraction,division,etc.


  • If you want to change the template(Visual style) of the Excel sheet then you can change here.It provides the some inbuilt templates.
  • MS-Excel shows the data  in graphical format(lines,graphs,charts,etc) also.