473,624 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

page_load executes twice ?

hi,
i have a problem with asp.net
when i was debugging
i put breakpoint to pageload event and then i discovered that
page is loaded once (explorer shows full page correctly but continues
loading)
but then
somehow page load executes again
and then page is displayed...
but there is different thing. when page executes page load second time,,
ispostback property is false (its like page is loading first time)

flow is like this
page load
(ispostback = false)
other events goes
-->here must show page (if you lok explorer at background it already shows
page but page goes on and execute page again like smting posted it back)
pageload (although page is loading second time ispostback property is false
again!!!!!!!)
explorer shows page
i want it to execute once (as normal pages do)
is a control posting my page back (if so why is ispostback property is false
again)

what can be my problem??

thanks in advance......
Nov 18 '05 #1
3 2530
Make sure your AutoEventWireUp ="false" in your @Page directive. If it is set
to true and you have also hooked the event through a code behind delegate
method then you will get Page_load fired twice.

--
Hope this helps,
Bryant Hankins
Numinet Systems Inc.
http://www.numinet.com

"erdem" <er***@kulube.n et> wrote in message
news:eU******** ******@TK2MSFTN GP12.phx.gbl...
hi,
i have a problem with asp.net
when i was debugging
i put breakpoint to pageload event and then i discovered that
page is loaded once (explorer shows full page correctly but continues
loading)
but then
somehow page load executes again
and then page is displayed...
but there is different thing. when page executes page load second time,,
ispostback property is false (its like page is loading first time)

flow is like this
page load
(ispostback = false)
other events goes
-->here must show page (if you lok explorer at background it already shows
page but page goes on and execute page again like smting posted it back)
pageload (although page is loading second time ispostback property is false again!!!!!!!)
explorer shows page
i want it to execute once (as normal pages do)
is a control posting my page back (if so why is ispostback property is false again)

what can be my problem??

thanks in advance......

Nov 18 '05 #2
no i already checked it
AutoEventWireUp ="false"
but i can ask this,

can a control post page.. (like dropdownlist with autopostback property set
true) if i change its index programmaticall y
if it can, will ispostback property be true or false (in my problem
ispostback is false(it loads page like i didnt loaded before))

"Bryant Hankins" <bryanthankins@ _NO_SPAM_hotmai l.com> wrote in message
news:uI******** ******@TK2MSFTN GP09.phx.gbl...
Make sure your AutoEventWireUp ="false" in your @Page directive. If it is set to true and you have also hooked the event through a code behind delegate
method then you will get Page_load fired twice.

--
Hope this helps,
Bryant Hankins
Numinet Systems Inc.
http://www.numinet.com

"erdem" <er***@kulube.n et> wrote in message
news:eU******** ******@TK2MSFTN GP12.phx.gbl...
hi,
i have a problem with asp.net
when i was debugging
i put breakpoint to pageload event and then i discovered that
page is loaded once (explorer shows full page correctly but continues
loading)
but then
somehow page load executes again
and then page is displayed...
but there is different thing. when page executes page load second time,,
ispostback property is false (its like page is loading first time)

flow is like this
page load
(ispostback = false)
other events goes
-->here must show page (if you lok explorer at background it already shows page but page goes on and execute page again like smting posted it back)
pageload (although page is loading second time ispostback property is

false
again!!!!!!!)
explorer shows page
i want it to execute once (as normal pages do)
is a control posting my page back (if so why is ispostback property is

false
again)

what can be my problem??

thanks in advance......


Nov 18 '05 #3
i already set AutoEventWireUp ="false" but,i found the line that cause
problem

panelxxx.visibl e=true;

panelxxx has 2 panels and that 2 panels has lots of controls.
when i set its visible property true
pageload executes twice
why can it be

thanks alot....
"erdem" <er***@kulube.n et> wrote in message
news:eU******** ******@TK2MSFTN GP12.phx.gbl...
hi,
i have a problem with asp.net
when i was debugging
i put breakpoint to pageload event and then i discovered that
page is loaded once (explorer shows full page correctly but continues
loading)
but then
somehow page load executes again
and then page is displayed...
but there is different thing. when page executes page load second time,,
ispostback property is false (its like page is loading first time)

flow is like this
page load
(ispostback = false)
other events goes
-->here must show page (if you lok explorer at background it already shows
page but page goes on and execute page again like smting posted it back)
pageload (although page is loading second time ispostback property is false again!!!!!!!)
explorer shows page
i want it to execute once (as normal pages do)
is a control posting my page back (if so why is ispostback property is false again)

what can be my problem??

thanks in advance......

Nov 18 '05 #4

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

Similar topics

10
3170
by: Manny | last post by:
I have a web form "Page1.asp" and it reads data from a database, does some calculations, and displays the records in pages. Works fine. I have a button that displays on the page, defined as <input type="button" onClick="OutputData()"> The OutputData() function is a javascript function that simply does this: window.location = "Page1.asp?Flag=1";
1
3377
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 twice. In another "regular" asp.net page that inherits only from its own codebehind page, the page load only executes once as you'd expect. Any ideas why the page_load fires twice in the former example? Thanks,
2
336
by: dx | last post by:
I have a simple user control (.ascx) that is dynamically instantiated in the calling aspx page and added to the control tree (within the page_load.) I have checked and the calling page only executes it's page_load once. Why is the page_load of the ascx fired twice? Thanks in advance, stan
4
2988
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 might get different results for executing it. If I have the webbrwoser control to call it the first time, the aspx will usually execute the page_load twice. What can be the problem?
14
13104
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) { //existing session? if (Session == null) { //save local empty order object this._newOrder = Orders.Initialize();
1
6947
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 "AutoEventWireUp" = false and also run after removing this tag from page directive but still my page_load event gets called twice. I have 3 pages called Search.asp, Processing.aspx and ConfirmSearch.aspx.
0
1396
by: Steven Nagy | last post by:
howdy all, As suggested, I have a web page that is executing the page life cycle twice (Init, page_load, prerender, etc) You arrive at this page by a common client side link. There is nothing unusual about this link, and looks something like this: mypage.aspx?ClientID=3 in this case, the target page actually creates a Crystal report that
11
2693
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 site, Page_Load gets called twice. Why is that and how can I fix this problem ? Thank you very much. Imports System.IO Namespace myProject Partial Class WebForm1
4
2853
by: David C | last post by:
I spent the last four hours trying to figure out why Page_Load would execute twice. Even stranger was that everything within if (! IsPostBack){....} executed twice as well. There is no rhyme or reason for that. Here is what I found out. When you have an ImageButton with no ImageURL set, it will always do that. This was not the case with .NET 1.0. So if you need to experiment with ImageButton, set something to the ImageUrl
0
8246
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8631
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8490
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7174
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1489
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.