javascript - How can my ASP.NET page go back and forth from client to server code and back several times? -


ok, tite seems little confusing, i'll try explain more thoroughly...

the process page follows following sequence: - user clicks button - server-side code goes retrieve data db , exposes said data client using, populating, let's say, hidden fields. - client-side code uses data fire activex component performs few tasks data provided.

and works fine, however, need optimize process because activex component not fit handle high volumes of data. need send data "blocks" component, rather them send data @ once done today.

however, hit roadblock here, on how can make page go , forth server client code multiple times? like... "user clicks button, server retrieves first block of data, sends client, client executes activex first block, client requests next block, server retrieves second block, sends client, client executes activex second block, client requests third block... , on"? can't past first request, since can't register client script block 2 times , expect ajax handle multiple sequential callbacks...

or there way?

this sounds more architectural issue else.

what should doing here is:

1) user clicks button. not regular submit button. plain old button executes local javascript.

2) local javascript makes ajax request determine how many records available.

3) javascript loop based on number of available records divided amount want pull per chunk.

3.a) execute ajax request chunk

3.b) throw data activex control - which, btw, suggest guys think getting rid of. there many issues activex it's not funny.

4) repeat 3.a , 3.b until completion.

you'll notice @ no point full post performed. you'll notice shouldn't have register client script blocks.

now draw here purely in activex control. can instantiated javascript multiple times in page or forced use single instance?

if it's limited single instance, you'll need different approach entirely.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -