C# web application - waiting for localhost
<p>I am struggeling with my web application. When I debug it using VS2008, it keeps on saying waiting for localhost in the web browser for ages !! I have restarted it, and still the same thing. I am implementing a web application that generates random numbers whenever a button is clicked, adds them up and shows the total. </p>

<p>I would really appreciate your recommendations. </p>

<p>Thanks !!</p>

<p>CODE:</p>

<pre><code> public partial class _Default : System.Web.UI.Page
    {

     private int RandomNumber(int min, int max)
     {
        Random random = new Random();

        return random.Next(min, max);

     }


        protected void Button1_Click1(object sender, EventArgs e)
        {
            int number = RandomNumber(1, 10);
            int number2 = RandomNumber(1, 10);
            int total = number + number2;
            Label1.Text = Convert.ToString(number);
            Label2.Text = Convert.ToString(number2);
            TextBox1.Text = Convert.ToString(total);

           try
           {
            while (total &lt;= 18)
            {
                int number3 = RandomNumber(1, 10);
                total = number + number2 + number3;
                Label4.Text = Convert.ToString(number3);
                TextBox1.Text = Convert.ToString(total);
            }}
            catch (Exception ex)
           {
                Console.WriteLine(ex);
            }
        }



        }
    }
</code></pre>
