title: Setting focus for MVC (Html.TextBoxFor) using jquery
body: <p>I'm working on an MVC project and am trying to set the focus on this:</p>
  
  <pre><code>&lt;td&gt;&lt;%=Html.TextBoxFor(de =&gt; Model.EmailAddress1)%&gt;&lt;/td&gt;
  </code></pre>
  
  <p>My jquery is in the same view near the top of the page:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $("[id$=MainContent_EmailAddress1").focus();
          $("#EmailAddress1").focus();
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I've tried a few combinations to set the focus to this box but nothing I've tried works.  Can anyone help?</p>