Difference between assigning a property and adding a attribute in a asp.net control
<p>I am creating ASP.NET textbox controls dynamically. I want to know the difference between assigning the property of the control and adding it as an attribute. </p>

<p>For ex:
I can do:</p>

<pre><code>TextBox txtBox = new TextBox();
txtBox.MaxLength = 100;
</code></pre>

<p>or I could do</p>

<pre><code>txtBox.Attributes.Add("maxlength", "100);
</code></pre>
