Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi experts,

I have built a small module to send 5000 data row from client to server.
On this entire process i want to update the label and i wanted to show the end user that how many rows has been sent to the server. This label updation process has to be done in between the process of sending the records ..not after sending all the data rows...... its very strange that no one knows about this. Experts please give some ideas in jquery or in ajax......

thanks in advance
(Keerthi Kumar)
Posted
Updated 11-Feb-14 0:16am
v3
Comments
sahabiswarup 10-Feb-14 7:59am    
Good Question! Please share if you found the solution.
So, what have you tried and where is the problem?
ZurdoDev 10-Feb-14 10:04am    
If you are posting back and doing all of the processing in C# then you won't be able to. If you can kick off the processing from JS so that you still have client side control then you can do it with jquery's .ajax() method.
Keerthi Kumar(Andar) 10-Feb-14 23:58pm    
Thanks for your suggestions. Can you please give me a hint that how i can do that using jquery or using ajax??
Prasad Avunoori 11-Feb-14 1:09am    
Hi Keerthi,

How are you sending data to Server? Bulk or Record by Record?

If you pass the data Record by Record you can achive the stuff how many records inserted so far. But, this could degrade the application performance.

1 solution

From comments i extracted that you are passing data Record by Record consuming JQuery.

let say your current method is like this

JavaScript
$.ajax({ 
type : xxx
url : xxx
dataType: xxx
.
.
.}).promise().done(function( response){
alert(response);
});


update it by writing

JavaScript
var globalTransmitCount = 0;

$.ajax({ 
type : xxx
url : xxx
dataType: xxx
.
.
.}).promise().done(function( response){
globalTransmitCount  = globalTransmitCount + 1;

$(#mydiv).html(globalTransmitCount + " records has been transmitted"); 

}));
 
Share this answer
 
Comments
Keerthi Kumar(Andar) 12-Feb-14 0:07am    
hi Zubair,
thanks for your answer,
but presently am not using jquery. Is that possible in simple c# or in ajax??
am not geeting how to use ur code..can u please help me to solve the issue??
Zubair Alie 12-Feb-14 1:37am    
Post your code snippet of transfer data (record by record) to .cs page. I will try to fill the gap in it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900