title: MaxLength property for textbox in code behind?
body: <p>I am trying to use MaxLength function for the textbox in code behind.</p>
  
  <p>How is it possible for textbox txttabname here, which is created dynamically. Any idea? Thanks a lot in advance!!</p>
  
  <pre><code>for (int i = 0; i &lt; additionalPageCount; i++)
      {
          if (i == 0)
          {
              this.pnlProfilePages.Controls.Add(new LiteralControl("&lt;tr&gt;&lt;td colspan=\"4\" style=\"width:100px;font-size:11px; padding-bottom: 10px;\"&gt;&lt;h3&gt;Page Tabs&lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;"));
          }
          this.pnlProfilePages.Controls.Add(new LiteralControl("&lt;tr&gt;&lt;td style=\"font-size:11px; padding-left:6px;\"&gt;Tab Name :&lt;/td&gt;&lt;td style=\"padding-right:10px;font-size:11px;MaxLength:20\"&gt;"));
          string txtTabControlID = "txtTabName" + i.ToString();
          TextBox txtTab = new TextBox();
          txtTab.ID = txtTabControlID;
          txtTab.Width = 100;
          txtTab.TabIndex = lastTabIndex++;
      }
  }
  </code></pre>