what u r entring in textbox.if it is numeric value it will work and if u
enter charcter thn it wil give error
give me ur proper code so i can understand what u want to do may be i can
help u


On 8/1/09, Rafael Anschau <[email protected]> wrote:
>
>
> private void button1_MouseClick(object sender, MouseEventArgs e)
>        {
>
>            string temp;
>            temp = textBox1.Text.ToString();
>            double temp2;
>            temp2 = Convert.ToInt32(temp);
>
>        }
>
>
> It compiles fine, but I get the runtime error "Format exception was
> unhandled"" Input
> string was not in a correct format" when the button is clicked.  The
> line it highlights is
> temp2 = Convert.ToInt32(temp).
>

Reply via email to