title: How to set focus to the webForm
body: <pre><code>else if (answer is TextAnswer)
      {
          this.Sourcecode.AppendLine("\t\t\t\t&lt;textarea id='" + id + "' name='" + id + "' value='' style='position: absolute; "
                                     + "top: " + top + "px; left: " + left + "px; height: " + height + "px; width: " + width + "px; "
                                     + "visibility:hidden; z-index: 2; resize: none;'&gt;&lt;/textarea&gt;");
  </code></pre>
  
  <p>This line of code creates a TextBox control on my web form but the problem is there is no focus set on it and I want to set focus.</p>
  
  <p>How to do this?</p>
  
  <p>This line of code works perfectly fine, I mean when I click on my web form it creates a control. Now when I click on it, it creates a control to write something then I have to click on it again , so i just want that when I click focus should be there.</p>