473,385 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Page_Load fires twice

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
Nov 17 '05 #1
0 1160

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gary | last post by:
When attempting to write a PDF stream to the web browser, the Page_Load event fires twice if a user has Internet Explorer configured to 'Check for newer versions of stored pages: Every visit to...
1
by: Jon | last post by:
Hi, I've set up a new web form (new.aspx) that inherits a BasePage class. The new web form contains an override Page_Load event. In BasePage, Page_Load is declared 'virtual'. In the new web...
7
by: Jay Douglas | last post by:
Hello all, I have a asp.net page that creates a pdf on the fly and sends the pdf down to the browser. When calling the page up in IE the Page_Load event is fried twice. This doesn't happen with...
1
by: bminder | last post by:
In the asp.net pages below, Common.vb has an overridable Page_Load sub. In the consuming page, Two.aspx, the Page_Load sub is inherited, but for some reason it (Overrides Sub Page_Load) executes...
4
by: Ed | last post by:
Has anyone seen this one? I have a situation where code in my page_load event is firing twice for mozilla firefox users. Everything is fine in IE6. I set breakpoints and verified. The second time...
14
by: V. Jenks | last post by:
I'm a little rusty having not touched .NET for 6 months and I can't remember why Page_Load is happening twice in this code: private void Page_Load(object sender, System.EventArgs e) {...
3
by: doobdave | last post by:
Hi all, I'm experiencing a rather strange problem: I am coding a web application using VB.net ASP.net and Visual Studio 2003. It's quite a large application, but the problem only occurs on...
4
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques...
0
by: pat.allan | last post by:
Hi All This seems to be a common problem here, but I've not found a solution yet to fix it for me. When I request a page through a browser, the page_load fires once. When I request the page's...
1
by: =?Utf-8?B?TWlrZXkgQmFieQ==?= | last post by:
Greetings Hopefully, I can be clear and concise on this one, but I'm confused. I have a page with a ListBox <- ODS <- BusinessObject and a button. The Parameter Source is 'None'. The Default...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.