Load AJAX Controls after page loads in ASP.NET?

I have a page which has several heavy user controls. These controls are on tabs that when the page first loads are hidden. I have seen pages where a piece of the page is loading when the page renders and they stated that they do this with AJAX.

I am relatively new to AJAX but was wondering how this was accomplished?

My theory was that I would create a JavaScript function that would kick off 6 requests using the Microsoft.XMLHTTP or Msxml2.XMLHTTP object and create child pages which render the code and simply pass back and dump the HTML onto the page. Is this the right way to do this? Is there a better way?

I am using the ASP.NET 3.5 framework with VB.NET as my back end.

Thanks so much for any and all assistance!!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you could always try to use the aspnet ajax controls...the javascript is already completed for you...


updatepanels are what provides partial postbacks...based upon triggers...i
MarcGraffAuthor Commented:
Thanks Silemone!

Just a few questions,

Will this allow the controls to kick off after the page has loaded?
Should each user control contain a UpdatePanel with a JavaScript "__doPostBack"?
MarcGraffAuthor Commented:
Thanks Silemone!

I have modified by code behind to read:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If IsPostBack Then
            More code
        End If
    End Sub

but the "More code" never fires. What have I done wrong?

<asp:UpdatePanel ID="pnlMain" runat="server">
        ASP.NET CODE
        <asp:Button id="btnLoad" runat="server" style="visibility:hidden;" />
        <asp:AsyncPostBackTrigger ControlID="btnLoad" EventName="Unload" />

Open in new window

ok...try it without if isPostBack to see if anything happens...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.