title: adding a textbox server control from code behind?
body: <p>I'm trying to add a new textbox server control to my page from code-behind.</p>
  
  <pre><code>TextBox txt=new TextBox();
  txt.Width=100;
  txt.Height=100;
  
  Page.Controls.Add(txt);
  </code></pre>
  
  <p>When I write following Code, this error is thrown:</p>
  
  <blockquote>
    <p>"Control 'ctl02' of type 'TextBox' must be placed inside a form tag with runat=server. "</p>
  </blockquote>
  
  <p>What's the reason this error is thrown? How should this be done? </p>