Converting string to int c# .NET

Associate
Joined
7 Sep 2007
Posts
400
Location
Edinburgh
I am pulling a price (real) from a SQL database and putting it into a text box, when I press the buy button.

TextBox1.Text = dr["Shirt_Price"].ToString();
TextBox2.Text = dr["Shoe_Price"].ToString();

I however want to add the two text box's together to give a total cost.

I have tried,

TextBox1.Text = Convert.ToInt32, but I can't get it to work.

I am still learning C#, so if anycome could put me in the right direction it would be great.
 
Back
Top Bottom