Click here to Skip to main content
15,911,707 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How to display loading time of a web page on the same page as label using C#
Posted
Comments
bbirajdar 5-Dec-12 4:19am    
what ??????

1 solution

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(address);
         System.Diagnostics.Stopwatch timer = new Stopwatch();
         timer.Start();
         HttpWebResponse response = (HttpWebResponse)request.GetResponse();
         timer.Stop();
         TimeSpan timeTaken = timer.Elapsed;
         Label1.Text = timeTaken.ToString();
 
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