Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi, how can I display the time duration on a label during running query for asp.net?

What I have tried:

I created 2 timers. One (Timer1) updates the time on a label, other (Timer2) executes stored procedure. But when timer 2 is enabled, Timer1 doesn't run and update the time on the label.
Posted
Updated 18-Nov-16 3:56am
Comments
planet06 21-Nov-16 1:05am    
I know this. But I want to display current duration time. For example ; 00:00:00 , 00:00:01, 00:00:02 ....

1 solution

Use the Stopwatch[^] class. Start timing before the SP and stop timing after, then show the results of the duration in your label.
 
Share this answer
 

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