i've got a script that takes about 10 seconds to complete with page_load.
for that reason, i turned to ajax for additional dynamic updates i needed to
do on the page without having to force the user through that 10 second
delay, but it looks like page_load still gets called with an ajax submit. am
i doing something wrong with my ajax calls or is this normal?
tks
Hello,
yes Page_Load is fired on the server even when using AJAX as it is crucial
part of the page lifecycle, one of the most important events. So if the
logic is something that must be done, AJAX doesn't help with that since
there's the initial loading of the Page anyway, and on async postback
(ajax's post) that same logic would take 10 seconds too, your page just
isn't halted for that 10 seconds, but you'd still need to wait 10 seconds to
get the results back.E.g browser doesn't have to stop and wait.
What you could do is that if you use ASP.NEt Ajax is that you can detect if
you're in partial postback (ScriptManager.IsInAsyncPostBack
http://www.asp.net/ajax/documentation/live/mref/P_System_Web_UI_ScriptManager_Is
InAsyncPostBack.aspx),
so that the logic isn't executed on the additional updates anymore (only on
the initial load). Another way is to try to make the code execution parallel
with the page execution by using asynchronous features of ASP.NEt 2.0
(http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/#S2)

Signature
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
> i've got a script that takes about 10 seconds to complete with page_load.
> for that reason, i turned to ajax for additional dynamic updates i needed
[quoted text clipped - 3 lines]
>
> tks
Dica - 31 Jul 2007 13:41 GMT
> Hello,
>
[quoted text clipped - 13 lines]
> parallel with the page execution by using asynchronous features of ASP.NEt
> 2.0 (http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/#S2)
thanks for the links, teemu. your first suggestion works great.
>> i've got a script that takes about 10 seconds to complete with page_load.
>> for that reason, i turned to ajax for additional dynamic updates i needed
[quoted text clipped - 3 lines]
>>
>> tks
It is normal.

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
> i've got a script that takes about 10 seconds to complete with page_load.
> for that reason, i turned to ajax for additional dynamic updates i needed
[quoted text clipped - 3 lines]
>
> tks
can you post you code
"Dica" <genpub5@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ:A%rri.84234$xk5.25981@edtnps82...
> i've got a script that takes about 10 seconds to complete with page_load.
> for that reason, i turned to ajax for additional dynamic updates i needed
[quoted text clipped - 3 lines]
>
> tks
> i've got a script that takes about 10 seconds to complete with page_load.
> for that reason, i turned to ajax for additional dynamic updates i needed to
[quoted text clipped - 3 lines]
>
> tks
hi
use Ajax pro... this library don't have that problem
http://www.ajaxpro.info/
Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com