page_load executes twice ?

E

erdem

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......
 
B

Bryant Hankins

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.
 
E

erdem

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))
 
E

erdem

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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top