473,322 Members | 1,540 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,322 software developers and data experts.

aspx pages load twice


Can someone help me try to figure out why my pages load twice? While
debugging other issues, I notice that a great many of my pages run
through the onload method twice, and sometimes they run through the
onclick method of buttons two times as well. As far as onlick is
concerned, I checked the .NET designer code and there is only 1 event
handler wired up, so I don't know why these actions are occuring in
duplicate. Is there a way to trace through and find out why?

--
surveyor04
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #1
4 2162
Most of the time, this is caused by the property AutoEventWireup set to true
instead of false.

S. L.

"surveyor04" <su***************@mail.codecomments.com> wrote in message
news:su***************@mail.codecomments.com...

Can someone help me try to figure out why my pages load twice? While
debugging other issues, I notice that a great many of my pages run
through the onload method twice, and sometimes they run through the
onclick method of buttons two times as well. As far as onlick is
concerned, I checked the .NET designer code and there is only 1 event
handler wired up, so I don't know why these actions are occuring in
duplicate. Is there a way to trace through and find out why?

--
surveyor04
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #2
Are you running with ASP.NET 1.1 sp1?

Microsoft .NET Framework 1.1 Page_Load Event Fires Two Times

http://support.microsoft.com/kb/827801

http://support.microsoft.com/kb/885055
"surveyor04" <su***************@mail.codecomments.com> wrote in message
news:su***************@mail.codecomments.com...

Can someone help me try to figure out why my pages load twice? While
debugging other issues, I notice that a great many of my pages run
through the onload method twice, and sometimes they run through the
onclick method of buttons two times as well. As far as onlick is
concerned, I checked the .NET designer code and there is only 1 event
handler wired up, so I don't know why these actions are occuring in
duplicate. Is there a way to trace through and find out why?

--
surveyor04
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------


Nov 19 '05 #3
I've had large chunks of code execute twice, due to bad programming on my
part.

Sometimes I needed to add a if(!Page.IsPostBack){ ... } wrapper to certain
function calls to make sure they only executed on the intial page load..
other times, I had certain objects or user controls with ViewState enabled
(which is default) but not always necessary and occasionally triggered
unanticpated code execution.
"surveyor04" <su***************@mail.codecomments.com> wrote in message
news:su***************@mail.codecomments.com...

Can someone help me try to figure out why my pages load twice? While
debugging other issues, I notice that a great many of my pages run
through the onload method twice, and sometimes they run through the
onclick method of buttons two times as well. As far as onlick is
concerned, I checked the .NET designer code and there is only 1 event
handler wired up, so I don't know why these actions are occuring in
duplicate. Is there a way to trace through and find out why?

--
surveyor04
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #4
Try setting AutoEventWireup set to false..
Cos i think by default its true.I had the smae problem once but this
fixed it..
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #5

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

Similar topics

3
by: Krzysztof Rozmus | last post by:
Hi, suddenly all pages in my ASP.NET application started to load twice, any idea what's going on ? Chris PS: I have AutoEventWireup="false" on all pages
1
by: JohnSmith | last post by:
I suspect this is easy, but I have been stumped for a day trying to solve this.. I want to be able to have an unlimited number of aspx pages that all use the code in one class file. I want code...
3
by: Evan | last post by:
I have a web page with 2 frames. The left frame is running menu.aspx and the right frame is running images.aspx. When a selection is made in menu.aspx I call a method in images.aspx and pass a...
7
by: J Smithers | last post by:
I have several ASPX pages (with code-behind logic) that I reuse amongst many Web sites on the same production server. Currently each Web site has its own copy of these aspx pages. I was thinking...
21
by: matvdl | last post by:
I have a system that was originally developed in asp - the pages are saved in SQL (there are over 10,000 pages) and saved to a temp directory in the server when requested by a client. I have...
1
by: Carl Gilbert | last post by:
Hi I am trying to get a site working with some 1&1 web space. I have the MS Business Pro account which has ASP.NET Support and SQL Server. I am trying to get an online gallery to work but I...
29
by: John Rivers | last post by:
Hello, What good reason there is for not allowing methods in ASPX pages I can't imagine, but here is how to get around that limitation: (START) <body MS_POSITIONING="FlowLayout"> <form...
0
by: rajendra.mishra | last post by:
Hi... I have a frame(Report.htm) which has two aspx pages one for header(header.aspx) and the other for displaying reports(Report.aspx). when Report.htm is called Report.aspx executes twice. I...
1
by: epower | last post by:
Hello, I am working on an ASP .NET application in Visual Studio 2005 and running IE7. This application has a page that contains an iframe which loads an .aspx page and hyperlinks that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.