Page_Load fires twice

H

H Branyan

I have a user control and its Page_Load event is firing twice.

I have consulted articles such as this one:
http://www.extremeexperts.com/Net/FAQ/PageLoadFiringTwice.aspx

This article essentially says that if I set AutoEventWireUp to false, then
the Page_Load will only fire once. However, that is not the right solution
for me. Here is my code:

in the .ascx.cs file:

protected override void Page_Load(object sender, System.EventArgs e)
{
Trace.Write("GenInf01", "Page_Load() begin");
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}

in the .ascx file:
Control Language="c#" AutoEventWireup="false" Codebehind="GenInf01.ascx.cs"
Inherits="MERC.AircatWeb.Applications.TAR._107RequestForm.GenInf01"
TargetSchema=http://schemas.microsoft.com/intellisense/ie5


Does anyone know what else to be looking for?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top