Convert textbox value to int : <p>I have a database and I assigned the price of a product from that database into a textbox. Whenever I try to convert the textbox value into an int, I receive a Format exception. I use the following code to convert: </p>

<pre><code>unitsA = Int32.Parse(units.Text);
</code></pre>

<p>And the database value is a smallint.</p>
