By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Portroe" <Po*****@nospam.com> schrieb
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.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

P: n/a
okay, I have being using txtage.Text = "" to clear the textbox on
submit,

how can I work around this?

thanks

Armin Zingler wrote:
"Portroe" <Po*****@nospam.com> schrieb
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.


Nov 20 '05 #3

P: n/a
"Portroe" <Po*****@nospam.com> schrieb
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.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

P: n/a
* Portroe <Po*****@nospam.com> scripsit:
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.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.