Hello,
I had a problem with loading an ASP.NET page twice recently. I knew from my previous experiences with such a problem that one of the main reasons that cause loading an ASP.NET page twice is the AutoEventWireup attribute of the page declaration in ASP.NET pages.
If AutoEventWireup attribute is set to True and if you are using an IDE like MS Visual Studio in your development environment, since Visual Studio automatically binds events to controls and because of AutoEventWireup attribute is True identifiying page events to be wired up automatically, each event triggered is processed twice on the server side.
But there is one reason causing events defined to be triggered twice on the server side. I think this happens when you copy and go editing on an existing asp.net web page on the Microsoft Visual Studio 2005 or VS2008 rapid development IDE environments.
Here is the reason I'm trying to mention above.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
You see Page_Load event is defined twice for MyBase.Load and Me.Load (Page.Load) events.
So it runs twice and even if you try to control the flow of the process using Page.IsPostBack property you will fail to prevent the execution of the Page_Load sub routine twice.
Removing the MyBase.Load will work successfully in this case.