Page_Load fires twice

Discussion in 'ASP .Net' started by H Branyan, Oct 22, 2003.

  1. H Branyan

    H Branyan Guest

    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?
    --
    [[((hillarie))]]

    To reply, remove ".SPAMBLOCK" from email address
    H Branyan, Oct 22, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon
    Replies:
    1
    Views:
    11,366
    George Ter-Saakov
    Jan 13, 2004
  2. Jay Douglas
    Replies:
    7
    Views:
    599
  3. =?Utf-8?B?RWQ=?=

    Page_Load fires twice with Mozilla

    =?Utf-8?B?RWQ=?=, Nov 20, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    4,464
    shailpatel83
    Apr 2, 2010
  4. doobdave
    Replies:
    3
    Views:
    4,086
    Jeff Evans
    Dec 17, 2004
  5. =?Utf-8?B?RXJpayBKZW5zZW4=?=

    CodeBehind But Not Postback - Page_Load fires twice

    =?Utf-8?B?RXJpayBKZW5zZW4=?=, Jul 19, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    3,310
    =?Utf-8?B?RXJpayBKZW5zZW4=?=
    Jul 21, 2005
Loading...

Share This Page