SyntaxFix
Write A Post
Hire A Developer
Questions
This would do
string x = TextBoxD1.Text; int xi = Convert.ToInt32(x);
Or you can use
int xi = Int32.Parse(x);
Refer Microsoft Developer Network for more information