jQuery cant get value from textbox
<p>I am trying to get a value from a textbox so that that I can rotate an Image using jQuery</p>

<pre><code>&lt;script src="Scripts/jQueryRotate.2.2.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function () {
   var angle = $("input:TextBox1").val();
    $("#needle").rotate(angle);
    alert(angle);
});
&lt;/script&gt;
</code></pre>

<p>And I'm populating the textbox as follows</p>

<pre><code>&lt;script runat="server"&gt;
protected void Page_Load(object sender, EventArgs e)
  { 
     WeatherLibrary.WeatherData wLib = new WeatherLibrary.WeatherData();
     double dataLatest;
     string sensorName;
     sensorName = "umtAdjWinDir";
     double dir = wLib.GetLatestData(sensorName).Value;
     dir = Math.Round(dir, 0);
     TextBox1.Text = dir.ToString();

   }
&lt;/script&gt;
</code></pre>

<p>TextBox1 is the the id of the textbox</p>

<pre><code>        &lt;asp:TextBox ID="TextBox1" runat="server" ReadOnly="True"&gt;&lt;/asp:TextBox&gt;
</code></pre>

<p>The alert I have given says <code>undefined</code> and the image never gets rotated.</p>
