473,385 Members | 1,740 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 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 2517
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.net> wrote in message
news:eU**************@TK2MSFTNGP12.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 programmatically
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_hotmail.com> wrote in message
news:uI**************@TK2MSFTNGP09.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.net> wrote in message
news:eU**************@TK2MSFTNGP12.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.visible=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.net> wrote in message
news:eU**************@TK2MSFTNGP12.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
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...
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...
2
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...
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...
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) {...
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...
0
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...
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...
4
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...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.