title: SetFocus to Control From Code Behind with JavaScript
body: <p>I am trying to set focus to a page control (Textbox) by using the registerStartupScript method. However, I have been unsuccessful. Here is what I have tried: </p>
  
  <pre><code>ClientScript.RegisterStartupScript(this.GetType(), "SetFocus", "&lt;script&gt;document.getElementById('" + this.tbAdjust.ClientID + "').focus();&lt;/script&gt;");
  </code></pre>
  
  <p>And: </p>
  
  <pre><code>ClientScript.RegisterStartupScript(GetType(), "focus", "&lt;script&gt;$('" + this.tbAdjust.ClientID + "');&lt;/script&gt;");
  </code></pre>
  
  <p>Can't seem to get it. Seems like a pretty straight forward question, if you all need anymore code, let me know. Thanks in advance for any help! </p>