0

I have to make alikation which is to measure the response time of site. Application can not be blocked during the response / request process?
Help please!

2
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by gogs85
0

Make an application that measures the response time of a site. Application can not be blocked during the response / request process.

The application should have a textbox control to enter an address. Label, to display the speed of response and two buttons, start and stop. If the start button is pressed, the button does not stop must be enabled

0

and i have code for Measure speed:

public void res()
        {
            System.Diagnostics.Stopwatch t = new System.Diagnostics.Stopwatch();
            t.Start();
            System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(textBox1.Text);
            System.Net.HttpWebResponse res = (System.Net.HttpWebResponse)req.GetResponse();
            t.Stop();
            res.Close();
            label1.Text=t.Elapsed.ToString();

        }

Edited by mike_2000_17: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.