Anyone have any idea when and why Page.OnLoad() executes twice in the ASP.NET lifecicle?
ASP.NET calls this method to raise the Load event. If you are developing a custom control, you can override this method in order to provide additional processing. If you override this method, call the base control's OnLoad method to notify subscribers to the event.
Do you have a an IMAGE element with a blank string for the URL on that page?
This one has caught so many people before :)
Make sure you don't have any tags like <img src="#"> or <img src="">, that makes IIS load the page twice. It's a classic.
Do you have AutoEventWireUp
set to true
and also attaching an event handler in code? This is a common reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With