JQuery Retrieving Data from aspx page
<p>I want retrieve data from aspx page. But, waiting data in static field if filling.</p>

<p><strong>JQuery :</strong></p>

<pre><code>   $.ajax({
        url: "Services/JSON/GetMessage.aspx",
        type: "GET",
        dataType: "json",
        success: function (response) { alert(response.Text); },
        error: function (x, t, m) {
            if (t === "timeout") {
                alert("got timeout");
            } else {
                alert(t);
            }
        }
    })
</code></pre>

<p><strong>Services/JSON/GetMessage.aspx</strong></p>

<pre><code>&lt;%@ Page Language="C#" %&gt;
&lt;% 
Response.Clear();
Response.ContentType = "text/json";
int tryCount = 0;
while (1 == 1)
{
    if (ClsStaticFields.Messages.Count &gt; 0)
    {
        foreach(string message in ClsStaticFields.Messages) {
             Response.Write("{ Text:'" + message + "' }");
        }
    }
    tryCount ++;
    if (tryCount &gt; 29) break; // 1 Minute wait and exit
    System.Threading.Thread.Sleep(2000); // 2 Second wait
}
Response.End();
%&gt;
</code></pre>

<p><strong>I was curious:</strong></p>

<ul>
<li>is this waiting period affects other users? </li>
<li>is this cause locks on IIS or pages ?</li>
<li>is this usage effecting badly to CPU ?</li>
</ul>
