Saturday, March 10, 2012

User controls that use Atlas having js sequential page load issues

Is your ws reference in your aspx or ascx? Also, where are you making the ws call from?

Generally, it's best not to make ws call in top level script. They should either be made base on some event (e.g. button click), or when you know the script is fully loaded. You can register a method that gets called when it's all loaded and do your work from there. e.g.

<components>

<application id="application" load="OnApplicationLoad" />

</components>


My reference and my web service call are in my .ascx. I tried your recommendation and it works perfectly, thanks!

Even with this fix, would you still recommend (from a best practices standpoint) not calling the ws from my .ascx, but rather from the .aspx?

Thanks,
Chris

No comments:

Post a Comment