Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For subscribing to Page events there are following ways:</p> <ul> <li><p>override the on_xxx methods of the Web.UI.Page class. For ease just start typing <code>private override</code> when you will type override keyword the Intellisense will automatically tell you the available methods you can override and you can select it from there and press tab (<strong>The prototype for the method will automatically be created for you</strong>).</p></li> <li><p>If the page has set <strong>AutoEventWireup</strong> attribute set to true then you can just define a method with prototype and name as <code>Page_[your event]</code> like <code>Page_Init</code> with appropriate parameters. And the events will will <strong>automatically be wired up</strong>.</p> <blockquote> <p>The ASP.NET page framework supports a mechanism that uses the AutoEventWireup attribute of a Web Forms page to automatically associate page events and event-handler methods. If the AutoEventWireup attribute of the @ Page directive is set to TRUE (or if it is not specified because its default value is TRUE), the ASP.NET page framework automatically calls page event-handler methods.</p> <p>For example, the Page_Init and Page_Load event-handler methods are explicitly called by the ASP.NET page framework, without an explicit event delegate.</p> <p>However, the drawback of using the AutoEventWireup attribute to automatically associate page events and their event-handler methods, is that event-handler methods must have standard, predefined names. This limits how you can name event-handler methods.</p> </blockquote></li> </ul> <p><hr/> Following is the summary of page Events in their order:</p> <ul> <li>PreInit</li> <li>Init</li> <li>InitComplete</li> <li>PreLoad</li> <li>Load</li> <li>Control events</li> <li>LoadComplete</li> <li>PreRender</li> <li>SaveStateComplete</li> <li>Render</li> <li>Unload</li> </ul> <p><hr/> I usually refer this cheetsheet kind of image from MSDN to check which method to override:</p> <p><img src="https://i.stack.imgur.com/VJk92.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload