Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Page_Load fires twice

Reply
Thread Tools

Page_Load fires twice

 
 
H Branyan
Guest
Posts: n/a
 
      10-22-2003
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/FA...ringTwice.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._107Requ estForm.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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page_Load fires twice with Mozilla =?Utf-8?B?RWQ=?= ASP .Net 7 04-02-2010 04:01 PM
CodeBehind But Not Postback - Page_Load fires twice =?Utf-8?B?RXJpayBKZW5zZW4=?= ASP .Net 4 07-21-2005 08:16 PM
Page_Load Event Fires Twice When Sending Down a PDF Jay Douglas ASP .Net 7 01-10-2005 05:05 PM
Page_Load Event fires twice....sometimes! doobdave ASP .Net 3 12-17-2004 06:56 PM
Page_Load event fires twice in asp.net (C#) ? Jon ASP .Net 1 01-13-2004 02:49 PM



Advertisments