I have two textBoxs and one button, textbox1 is ascept Number and textbox2 is convert them in Words. when i click button1 as a clear the field it shows the error-
Input string was not in a correct format
error dialogbox shows here error-
string word = ConvertNumbertoWords(Convert.ToInt32(txtamount.Text));
What I have tried:
private void buttonClear_Click(object sender, EventArgs e)
{
textBox1.Text = String.Empty;
txtsrno.Text = String.Empty;
txtdescription.Text = String.Empty;
txtquantity.Text = String.Empty;
txtrate.Text = String.Empty;
comboBox1.Text = String.Empty;
txtamount.Text = String.Empty;
txtword.Text = String.Empty;
string word = ConvertNumbertoWords(Convert.ToInt32(txtamount.Text));
txtword.Text = word;
}
string word = ConvertNumbertoWords(Convert.ToInt32(txtamount.Text));