title: jQuery UI Datepicker for a Html.TextBox control
body: <p>I need to show the jQuery UI Datepicker plug in for <code>Html.TextBox</code>, how can I do this?</p>
  
  <p>jQuery Code:</p>
  
  <pre><code>&lt;script&gt;
      $(function () {
          $("#datepicker").datepicker();
      });
  &lt;/script&gt;
  
  &lt;div class="demo"&gt;
       &lt;p&gt;Date: &lt;input type="text" id="datepicker" style = "width:150px"/&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The above code gives me a text box control in my MVC view where I can click on the control and it pops up a calendar control, it works well, but what I want is to reproduce the same behavior for a <code>Html.Textbox</code> I am using later in the code, like this:</p>
  
  <pre><code>&lt;%= Html.TextBox("Date", "", new { style = "width:150px"})%&gt; 
  </code></pre>
  
  <p>How can I get the jQuery UI Datepicker plugin to work in the above line of code?</p>