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

Page_Load Runs Twice?

I have setup a number of trace outputs to try and track down an error in a
process within my webpage. In doing so I have noticed that the pageload sub
is running twice, once after the other. Is this a feature or have I done
something?

Mike
Nov 19 '05 #1
5 1528
Mike- you do need to share your codes. One of the reason could be- page_load
event is referenced in the .aspx file but I am not certain w/o looking at
the codes.

Prodip
www.aspnet4you.com

"Mike Trebilcock" <ti***@trebilcock.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
I have setup a number of trace outputs to try and track down an error in a
process within my webpage. In doing so I have noticed that the pageload sub is running twice, once after the other. Is this a feature or have I done
something?

Mike

Nov 19 '05 #2
Hi Mike,

Make sure that AutoEventWireup is set to false in your @Page directive.
If it is set to true, Visual Studio automatically hooks up event
handlers.

Hope this helps.

Tod Birdsall, MCSD
http://tod1d.blogspot.com

Nov 19 '05 #3
Besides the other suggestions you have received, which are good,
if you are using SmartNavigation and ASP.NET 1.1, it could
be the result of a documented bug which requires a hotfix.

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

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Mike Trebilcock" <ti***@trebilcock.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
I have setup a number of trace outputs to try and track down an error in a
process within my webpage. In doing so I have noticed that the pageload sub
is running twice, once after the other. Is this a feature or have I done
something?

Mike

Nov 19 '05 #4
I had smart navigation switched on to see what it did! Mess everything
around by the looks of things.

Thanks for all the replies, I ahve now turned it off and everything is as
running as it should.

Mike

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:#l**************@TK2MSFTNGP09.phx.gbl...
Besides the other suggestions you have received, which are good,
if you are using SmartNavigation and ASP.NET 1.1, it could
be the result of a documented bug which requires a hotfix.

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

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Mike Trebilcock" <ti***@trebilcock.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
I have setup a number of trace outputs to try and track down an error in a process within my webpage. In doing so I have noticed that the pageload sub is running twice, once after the other. Is this a feature or have I done something?

Mike


Nov 19 '05 #5
Well, now you know!

;-)

Glad to see that was what was happening,
and that switching off SmartNavigation was the fix.

Mind you...you can *still* use SmartNavigation if you need it,
but you'll have to install the hotfix for it to work correctly.

Carry on!
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Mike Trebilcock" <ti***@trebilcock.net> wrote in message
news:u9**************@TK2MSFTNGP10.phx.gbl...
I had smart navigation switched on to see what it did! Mess everything
around by the looks of things.

Thanks for all the replies, I ahve now turned it off and everything is as
running as it should.

Mike

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:#l**************@TK2MSFTNGP09.phx.gbl...
Besides the other suggestions you have received, which are good,
if you are using SmartNavigation and ASP.NET 1.1, it could
be the result of a documented bug which requires a hotfix.

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

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Mike Trebilcock" <ti***@trebilcock.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
>I have setup a number of trace outputs to try and track down an error in a > process within my webpage. In doing so I have noticed that the pageload sub > is running twice, once after the other. Is this a feature or have I done > something?
>
> Mike
>
>



Nov 19 '05 #6

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

Similar topics

7
by: Shane Bishop | last post by:
I've been fighting with the Page_Load event firing twice. I looked through this user group and saw several other people having similar problems. There were various reasons for it:...
2
by: magister | last post by:
Hello I have a default.aspx page with which has an iframe. In the code-behind of the default.aspx page it loads the 'src' attribute of the iframe. The iframe loads another aspx page, but...
4
by: Julia | last post by:
Hi Everyone, I am using webbrowser control to post data to an aspx page. However, for some reason, the aspx page sometimes will execute page_load event twice, and sometimes execute it once. So I...
6
by: Dot net work | last post by:
I've read quite a few threads on these groups about this. When someone says the following: "My Page_Load gets called twice on a button click postback" The replies are: "Do you have...
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) {...
4
by: Erik Jensen | last post by:
Hello All, I am trying a non-standard approace to asp.net that i hope will work so I can get an xhtml complient page. Setup as Follows: Code-behind but not form runat="server" so traditional...
3
by: Imran Aziz | last post by:
Hello All, I have a search text and button that post data and my button handler filters the repeater control. However when the button is clicked the first time. The page_load event is being called...
1
by: puja | last post by:
hi all, I have this .aspx page for which the Page_load event occurs twice. I found out while debugging. After searching google, I tried checking with Page.Ispostback method and also had...
11
by: fiefie.niles | last post by:
I am using ASP.NET 2005 and I have a simple form. Page_Load calls a sub mySub that does not do anything (for testing purposes). But, Page_Load gets called twice. On every single ASPX page in my...
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: 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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.