Menu

#44 Asynchronous Loading of Anthem Controls

open
nobody
5
2006-08-17
2006-08-17
Anonymous
No

Is that possible to specify that Anthem controls to
be loaded asynchronously through ajax?

For example If I put 10 gridview controls on my page
it would take forever to load the page. I don't want
to wait, let the page open instantly, and then all
the controls will be loaded asynchronously through
ajax.

Thanks.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I meant the initial loading.

     
  • Nobody/Anonymous

    Logged In: NO

    That's a great idea. Anthem is not designed that way, but
    you can probably do that using a little custom scripting.

    The normal ASP/Anthem pattern is to perform a databind in
    the first PageLoad. For example,

    If !IsPostBack Then BindData()

    What you could do is skip the data bind in the PageLoad
    handler. Instead add a client script that calls
    Anthem_InvokePageMethod and use the method to perform the
    data bind. For example,

    Page.RegisterStartupScript("Anthem_InvokePageScript
    ('LoadGrid', 'grid1')")
    Page.RegisterStartupScript("Anthem_InvokePageScript
    ('LoadGrid', 'grid2')")

    [note: the syntax is wrong...this is just an example]

    Then the LoadGrid method would load the grids.

     

Log in to post a comment.