Page_Load is a handler for the Load event, which is generated in OnLoad.
OnLoad is inherited from Control (Page is derived from TemplateControl,
which is derived from Control).
Unless you are creating custom Page classes, you will generally stick with
the Page_OnLoad event handler instead of driving down into the methods
below.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************** ********************
Think Outside the Box!
************************************************** ********************
<fo******@yahoo.co.uk> wrote in message
news:ac**************************@posting.google.c om...
Hi
I am aware of how Page_Load and OnLoad work. What I am curious about is
-why- there are 2 mechanisms for doing the same thing, in particular why
Visual Studio will generate code to implement the Page_Load functionality
and not OnLoad.
When should either be used?
My guess is that because OnLoad should call the base.OnLoad method its
slightly cleaner using the Page_Load mechanism but that sounds a bit
naff.
Any ideas?
Ta
F