.. "" to type 'integer' is not valid,'

  • Thread starter Thread starter Portroe
  • Start date Start date
P

Portroe

on running debug I get the following error,

' cast from string "" to type 'integer' is not valid,'

I am experimenting with file writing and reading,

what sort of error am I looking for in my code here?

the first time I ran the code it worked,

baffled,

Portroe
 
Portroe said:
on running debug I get the following error,

' cast from string "" to type 'integer' is not valid,'

I am experimenting with file writing and reading,

what sort of error am I looking for in my code here?

the first time I ran the code it worked,

Right, "" can not be converted to integer. Do you try to convert it? If yes,
that's the reason for the problem. If no, show us the line throwing this
exception and the values of the used variables.
 
okay, I have being using txtage.Text = "" to clear the textbox on
submit,

how can I work around this?

thanks
 
Portroe said:
okay, I have being using txtage.Text = "" to clear the textbox on
submit,

I can not imagine that the line above throws the invalid cast exception.
 
* Portroe said:
okay, I have being using txtage.Text = "" to clear the textbox on
submit,

Post the piece of code how you convert/try to convert the string
to an integer.
 
Back
Top