Pages support an automatic way to bind their events to methods.
If the AutoEventWireup attribute of the @ Page directive is set to true
(or if it is missing, because by default it is true), page events are automatically
bound to methods that use the naming convention of Page_event,
such as Page_Load and Page_Init.
The AutoEventWireup attribute requires that the
page event handlers have specific, predictable names.
If you want to create your own names for page event handlers, you can set
AutoEventWireup to false and then bind the events to the methods explicitly.
For example, in Visual Basic, you can use the Handles keyword to perform the binding.
If you include explicit binding, you must make sure that the
AutoEventWireup is disabled so that the method is not called twice,
once automatically by AutoEventWireup and another time by
your explicit binding.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
Foros de ASP.NET en Español :
http://asp.net.do/foros/
======================================
"Mr Newbie" <he**@now.com> wrote in message news:eP**************@TK2MSFTNGP11.phx.gbl...
Thats interesting, Ive never come across this before , why is that Hans ?
Regards Mr N
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:uG**************@tk2msftngp13.phx.gbl... MaryA wrote: I have an aspx page that loads twice inspite of using the IsPostBack
i removed all controls from the page and still the page_load event is
called twice
I appriciate any help coz i have lost several hours on this
NB even i removed all events called on page load but still same
problem
Regards
What language are you using?
do you have AutoEventWireup="false" in the @Page directive?
(this set to true is usually the reason Page_Load is called twice)
Hans Kesting